hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject [1/2] hbase git commit: HBASE-19846 Fix findbugs and error-prone warnings in hbase-rest (branch-2)
Date Thu, 25 Jan 2018 15:30:04 GMT
Repository: hbase
Updated Branches:
  refs/heads/master ce50830a0 -> aeffca497


http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java
index a10fef0..1d1b5cd 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestTableScan.java
@@ -22,12 +22,19 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+
 import java.io.DataInputStream;
 import java.io.EOFException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Serializable;
 import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -70,12 +77,6 @@ import org.slf4j.LoggerFactory;
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
 
-import com.fasterxml.jackson.core.JsonFactory;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonToken;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
-
 @Category({RestTests.class, MediumTests.class})
 public class TestTableScan {
   private static final Logger LOG = LoggerFactory.getLogger(TestTableScan.class);
@@ -283,12 +284,14 @@ public class TestTableScan {
 
     // install the callback on all ClientSideCellSetModel instances
     unmarshaller.setListener(new Unmarshaller.Listener() {
+        @Override
         public void beforeUnmarshal(Object target, Object parent) {
             if (target instanceof ClientSideCellSetModel) {
                 ((ClientSideCellSetModel) target).setCellSetModelListener(listener);
             }
         }
 
+        @Override
         public void afterUnmarshal(Object target, Object parent) {
             if (target instanceof ClientSideCellSetModel) {
                 ((ClientSideCellSetModel) target).setCellSetModelListener(null);
@@ -460,7 +463,8 @@ public class TestTableScan {
     CellSetModel model = (CellSetModel) ush.unmarshal(response.getStream());
     int count = TestScannerResource.countCellSet(model);
     assertEquals(1, count);
-    assertEquals("aab", new String(model.getRows().get(0).getCells().get(0).getValue()));
+    assertEquals("aab",
+        new String(model.getRows().get(0).getCells().get(0).getValue(), StandardCharsets.UTF_8));
   }
 
   @Test
@@ -478,7 +482,8 @@ public class TestTableScan {
     CellSetModel model = (CellSetModel) ush.unmarshal(response.getStream());
     int count = TestScannerResource.countCellSet(model);
     assertEquals(1, count);
-    assertEquals("abc", new String(model.getRows().get(0).getCells().get(0).getValue()));
+    assertEquals("abc",
+        new String(model.getRows().get(0).getCells().get(0).getValue(), StandardCharsets.UTF_8));
   }
 
   @Test
@@ -496,7 +501,8 @@ public class TestTableScan {
     CellSetModel model = (CellSetModel) ush.unmarshal(response.getStream());
     int count = TestScannerResource.countCellSet(model);
     assertEquals(1, count);
-    assertEquals("abc", new String(model.getRows().get(0).getCells().get(0).getValue()));
+    assertEquals("abc",
+        new String(model.getRows().get(0).getCells().get(0).getValue(), StandardCharsets.UTF_8));
   }
 
   @Test
@@ -515,7 +521,8 @@ public class TestTableScan {
     CellSetModel model = (CellSetModel) ush.unmarshal(response.getStream());
     int count = TestScannerResource.countCellSet(model);
     assertEquals(1, count);
-    assertEquals("abc", new String(model.getRows().get(0).getCells().get(0).getValue()));
+    assertEquals("abc",
+        new String(model.getRows().get(0).getCells().get(0).getValue(), StandardCharsets.UTF_8));
   }
 
   @Test
@@ -633,6 +640,7 @@ public class TestTableScan {
         row = (l == null) ? null : new ArrayList<RowModel>() {
         private static final long serialVersionUID = 1L;
 
+            @Override
             public boolean add(RowModel o) {
                 l.handleRowModel(ClientSideCellSetModel.this, o);
                 listenerInvoked = true;

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestVersionResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestVersionResource.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestVersionResource.java
index 50cb085..0f8d7f2 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestVersionResource.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/TestVersionResource.java
@@ -18,6 +18,13 @@
  */
 package org.apache.hadoop.hbase.rest;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 
@@ -34,17 +41,9 @@ import org.apache.hadoop.hbase.rest.model.VersionModel;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.glassfish.jersey.servlet.ServletContainer;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
-
-import static org.junit.Assert.*;
-
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-
 import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -79,7 +78,7 @@ public class TestVersionResource {
   private static void validate(VersionModel model) {
     assertNotNull(model);
     assertNotNull(model.getRESTVersion());
-    assertEquals(model.getRESTVersion(), RESTServlet.VERSION_STRING);
+    assertEquals(RESTServlet.VERSION_STRING, model.getRESTVersion());
     String osVersion = model.getOSVersion(); 
     assertNotNull(osVersion);
     assertTrue(osVersion.contains(System.getProperty("os.name")));

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestXmlParsing.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestXmlParsing.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestXmlParsing.java
index cf5519e..e86039a 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestXmlParsing.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/client/TestXmlParsing.java
@@ -29,6 +29,7 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.rest.Constants;
 import org.apache.hadoop.hbase.rest.model.StorageClusterVersionModel;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.util.StringUtils;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -48,7 +49,7 @@ public class TestXmlParsing {
         + "<ClusterVersion Version=\"2.0.0\"/>";
     Client client = mock(Client.class);
     RemoteAdmin admin = new RemoteAdmin(client, HBaseConfiguration.create(), null);
-    Response resp = new Response(200, null, xml.getBytes());
+    Response resp = new Response(200, null, Bytes.toBytes(xml));
 
     when(client.get("/version/cluster", Constants.MIMETYPE_XML)).thenReturn(resp);
 
@@ -64,7 +65,7 @@ public class TestXmlParsing {
         + " <ClusterVersion>&xee;</ClusterVersion>";
     Client client = mock(Client.class);
     RemoteAdmin admin = new RemoteAdmin(client, HBaseConfiguration.create(), null);
-    Response resp = new Response(200, null, externalEntitiesXml.getBytes());
+    Response resp = new Response(200, null, Bytes.toBytes(externalEntitiesXml));
 
     when(client.get("/version/cluster", Constants.MIMETYPE_XML)).thenReturn(resp);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
index 96e1089..d874505 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
@@ -19,6 +19,10 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -48,6 +52,7 @@ public class TestCellModel extends TestModelBase<CellModel> {
       "{\"column\":\"dGVzdGNvbHVtbg==\",\"timestamp\":1245219839331,\"$\":\"dGVzdHZhbHVl\"}";
   }
 
+  @Override
   protected CellModel buildTestModel() {
     CellModel model = new CellModel();
     model.setColumn(COLUMN);
@@ -56,21 +61,25 @@ public class TestCellModel extends TestModelBase<CellModel> {
     return model;
   }
 
+  @Override
   protected void checkModel(CellModel model) {
     assertTrue(Bytes.equals(model.getColumn(), COLUMN));
     assertTrue(Bytes.equals(model.getValue(), VALUE));
     assertTrue(model.hasUserTimestamp());
-    assertEquals(model.getTimestamp(), TIMESTAMP);
+    assertEquals(TIMESTAMP, model.getTimestamp());
   }
 
+  @Override
   public void testBuildModel() throws Exception {
     checkModel(buildTestModel());
   }
 
+  @Override
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }
 
+  @Override
   public void testFromPB() throws Exception {
     checkModel(fromPB(AS_PB));
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
index 2bef955..b4d9290 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
@@ -19,6 +19,10 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Iterator;
 
 import org.apache.hadoop.hbase.testclassification.RestTests;
@@ -81,6 +85,7 @@ public class TestCellSetModel extends TestModelBase<CellSetModel>
{
       "\"timestamp\":1245393318192,\"$\":\"dGVzdHZhbHVlMw==\"}]}]}";
   }
 
+  @Override
   protected CellSetModel buildTestModel() {
     CellSetModel model = new CellSetModel();
     RowModel row;
@@ -96,6 +101,7 @@ public class TestCellSetModel extends TestModelBase<CellSetModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(CellSetModel model) {
     Iterator<RowModel> rows = model.getRows().iterator();
     RowModel row = rows.next();
@@ -105,7 +111,7 @@ public class TestCellSetModel extends TestModelBase<CellSetModel>
{
     assertTrue(Bytes.equals(COLUMN1, cell.getColumn()));
     assertTrue(Bytes.equals(VALUE1, cell.getValue()));
     assertTrue(cell.hasUserTimestamp());
-    assertEquals(cell.getTimestamp(), TIMESTAMP1);
+    assertEquals(TIMESTAMP1, cell.getTimestamp());
     assertFalse(cells.hasNext());
     row = rows.next();
     assertTrue(Bytes.equals(ROW2, row.getKey()));
@@ -114,23 +120,26 @@ public class TestCellSetModel extends TestModelBase<CellSetModel>
{
     assertTrue(Bytes.equals(COLUMN2, cell.getColumn()));
     assertTrue(Bytes.equals(VALUE2, cell.getValue()));
     assertTrue(cell.hasUserTimestamp());
-    assertEquals(cell.getTimestamp(), TIMESTAMP2);
+    assertEquals(TIMESTAMP2, cell.getTimestamp());
     cell = cells.next();
     assertTrue(Bytes.equals(COLUMN3, cell.getColumn()));
     assertTrue(Bytes.equals(VALUE3, cell.getValue()));
     assertTrue(cell.hasUserTimestamp());
-    assertEquals(cell.getTimestamp(), TIMESTAMP3);
+    assertEquals(TIMESTAMP3, cell.getTimestamp());
     assertFalse(cells.hasNext());
   }
 
+  @Override
   public void testBuildModel() throws Exception {
     checkModel(buildTestModel());
   }
 
+  @Override
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }
 
+  @Override
   public void testFromPB() throws Exception {
     checkModel(fromPB(AS_PB));
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
index 3c41d6d..8ddf569 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
@@ -19,8 +19,12 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 @Category({RestTests.class, SmallTests.class})
@@ -48,6 +52,7 @@ public class TestColumnSchemaModel extends TestModelBase<ColumnSchemaModel>
{
           "\"TTL\":\"86400\",\"IN_MEMORY\":\"false\"}";
   }
 
+  @Override
   protected ColumnSchemaModel buildTestModel() {
     ColumnSchemaModel model = new ColumnSchemaModel();
     model.setName(COLUMN_NAME);
@@ -61,6 +66,7 @@ public class TestColumnSchemaModel extends TestModelBase<ColumnSchemaModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(ColumnSchemaModel model) {
     assertEquals("name", COLUMN_NAME, model.getName());
     assertEquals("block cache", BLOCKCACHE, model.__getBlockcache());
@@ -72,6 +78,8 @@ public class TestColumnSchemaModel extends TestModelBase<ColumnSchemaModel>
{
     assertEquals("versions", VERSIONS, model.__getVersions());
   }
 
+  @Override
+  @Test
   public void testFromPB() throws Exception {
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
index b5826b8..977f6c2 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestModelBase.java
@@ -18,26 +18,30 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import javax.ws.rs.core.MediaType;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.rest.ProtobufMessageHandler;
 import org.apache.hadoop.hbase.rest.provider.JAXBContextResolver;
 import org.apache.hadoop.hbase.util.Base64;
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import javax.ws.rs.core.MediaType;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
-
 @Category({RestTests.class, SmallTests.class})
-public abstract class TestModelBase<T> extends TestCase {
+public abstract class TestModelBase<T> {
 
   protected String AS_XML;
 
@@ -94,29 +98,34 @@ public abstract class TestModelBase<T> extends TestCase {
   protected T fromPB(String pb) throws
       Exception {
     return (T)clazz.getMethod("getObjectFromMessage", byte[].class).invoke(
-        clazz.newInstance(),
+        clazz.getDeclaredConstructor().newInstance(),
         Base64.decode(AS_PB));
   }
 
   protected abstract  void checkModel(T model);
 
+  @Test
   public void testBuildModel() throws Exception {
     checkModel(buildTestModel());
   }
 
+  @Test
   public void testFromPB() throws Exception {
     checkModel(fromPB(AS_PB));
   }
 
+  @Test
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }
 
+  @Test
   public void testToXML() throws Exception {
     // Uses fromXML to check model because XML element ordering can be random.
     checkModel(fromXML(toXML(buildTestModel())));
   }
 
+  @Test
   public void testToJSON() throws Exception {
     try {
       ObjectNode expObj = mapper.readValue(AS_JSON, ObjectNode.class);
@@ -127,6 +136,7 @@ public abstract class TestModelBase<T> extends TestCase {
     }
   }
 
+  @Test
   public void testFromJSON() throws Exception {
     checkModel(fromJSON(AS_JSON));
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
index 3dee5cb..0694898 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesInstanceModel.java
@@ -19,6 +19,9 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -53,6 +56,7 @@ public class TestNamespacesInstanceModel extends TestModelBase<NamespacesInstanc
       "\"KEY_1\":\"VALUE_1\",\"KEY_2\":\"VALUE_2\"}}";
   }
 
+  @Override
   protected NamespacesInstanceModel buildTestModel() {
     return buildTestModel(NAMESPACE_NAME, NAMESPACE_PROPERTIES);
   }
@@ -65,6 +69,7 @@ public class TestNamespacesInstanceModel extends TestModelBase<NamespacesInstanc
     return model;
   }
 
+  @Override
   protected void checkModel(NamespacesInstanceModel model) {
     checkModel(model, NAMESPACE_NAME, NAMESPACE_PROPERTIES);
   }
@@ -80,16 +85,19 @@ public class TestNamespacesInstanceModel extends TestModelBase<NamespacesInstanc
     }
   }
 
+  @Override
   @Test
   public void testBuildModel() throws Exception {
     checkModel(buildTestModel());
   }
 
+  @Override
   @Test
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }
 
+  @Override
   @Test
   public void testFromPB() throws Exception {
     checkModel(fromPB(AS_PB));

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesModel.java
index 12dd004..9ff7551 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestNamespacesModel.java
@@ -19,6 +19,9 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Arrays;
 import java.util.List;
 
@@ -47,6 +50,7 @@ public class TestNamespacesModel extends TestModelBase<NamespacesModel>
{
     AS_JSON = "{\"Namespace\":[\"testNamespace1\",\"testNamespace2\"]}";
   }
 
+  @Override
   protected NamespacesModel buildTestModel() {
     return buildTestModel(NAMESPACE_NAME_1, NAMESPACE_NAME_2);
   }
@@ -57,6 +61,7 @@ public class TestNamespacesModel extends TestModelBase<NamespacesModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(NamespacesModel model) {
     checkModel(model, NAMESPACE_NAME_1, NAMESPACE_NAME_2);
   }
@@ -69,16 +74,19 @@ public class TestNamespacesModel extends TestModelBase<NamespacesModel>
{
     }
   }
 
+  @Override
   @Test
   public void testBuildModel() throws Exception {
     checkModel(buildTestModel());
   }
 
+  @Override
   @Test
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }
 
+  @Override
   @Test
   public void testFromPB() throws Exception {
     checkModel(fromPB(AS_PB));

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
index 7ba61b8..88593c5 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
@@ -19,9 +19,11 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
-import java.util.Iterator;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
-import javax.xml.bind.JAXBContext;
+import java.util.Iterator;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -41,8 +43,6 @@ public class TestRowModel extends TestModelBase<RowModel> {
   private static final byte[] VALUE1 = Bytes.toBytes("testvalue1");
   private static final long TIMESTAMP1 = 1245219839331L;
 
-  private JAXBContext context;
-
   public TestRowModel() throws Exception {
     super(RowModel.class);
     AS_XML =
@@ -54,6 +54,7 @@ public class TestRowModel extends TestModelBase<RowModel> {
       "\"timestamp\":1245219839331,\"$\":\"dGVzdHZhbHVlMQ==\"}]}";
   }
 
+  @Override
   protected RowModel buildTestModel() {
     RowModel model = new RowModel();
     model.setKey(ROW1);
@@ -61,6 +62,7 @@ public class TestRowModel extends TestModelBase<RowModel> {
     return model;
   }
 
+  @Override
   protected void checkModel(RowModel model) {
     assertTrue(Bytes.equals(ROW1, model.getKey()));
     Iterator<CellModel> cells = model.getCells().iterator();
@@ -68,7 +70,7 @@ public class TestRowModel extends TestModelBase<RowModel> {
     assertTrue(Bytes.equals(COLUMN1, cell.getColumn()));
     assertTrue(Bytes.equals(VALUE1, cell.getValue()));
     assertTrue(cell.hasUserTimestamp());
-    assertEquals(cell.getTimestamp(), TIMESTAMP1);
+    assertEquals(TIMESTAMP1, cell.getTimestamp());
     assertFalse(cells.hasNext());
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
index a5ac2ca..06c1c1c 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
@@ -19,6 +19,9 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -58,6 +61,7 @@ public class TestScannerModel extends TestModelBase<ScannerModel>
{
         + "JDj/////B0joB1IHcHJpdmF0ZVIGcHVibGljWAA=";
   }
 
+  @Override
   protected ScannerModel buildTestModel() {
     ScannerModel model = new ScannerModel();
     model.setStartRow(START_ROW);
@@ -74,6 +78,7 @@ public class TestScannerModel extends TestModelBase<ScannerModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(ScannerModel model) {
     assertTrue(Bytes.equals(model.getStartRow(), START_ROW));
     assertTrue(Bytes.equals(model.getEndRow(), END_ROW));
@@ -87,11 +92,11 @@ public class TestScannerModel extends TestModelBase<ScannerModel>
{
     }
     assertTrue(foundCol1);
     assertTrue(foundCol2);
-    assertEquals(model.getStartTime(), START_TIME);
-    assertEquals(model.getEndTime(), END_TIME);
-    assertEquals(model.getBatch(), BATCH);
-    assertEquals(model.getCaching(), CACHING);
-    assertEquals(model.getCacheBlocks(), CACHE_BLOCKS);
+    assertEquals(START_TIME, model.getStartTime());
+    assertEquals(END_TIME, model.getEndTime());
+    assertEquals(BATCH, model.getBatch());
+    assertEquals(CACHING, model.getCaching());
+    assertEquals(CACHE_BLOCKS, model.getCacheBlocks());
     boolean foundLabel1 = false;
     boolean foundLabel2 = false;
     if (model.getLabels() != null && model.getLabels().size() > 0) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
index 18060e8..58b538f 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
@@ -19,6 +19,10 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Iterator;
 
 import org.apache.hadoop.hbase.testclassification.RestTests;
@@ -74,6 +78,7 @@ public class TestStorageClusterStatusModel extends TestModelBase<StorageClusterS
           "\"heapSizeMB\":512,\"maxHeapSizeMB\":1024}],\"DeadNodes\":[]}";
   }
 
+  @Override
   protected StorageClusterStatusModel buildTestModel() {
     StorageClusterStatusModel model = new StorageClusterStatusModel();
     model.setRegions(2);
@@ -87,56 +92,57 @@ public class TestStorageClusterStatusModel extends TestModelBase<StorageClusterS
     return model;
   }
 
+  @Override
   protected void checkModel(StorageClusterStatusModel model) {
-    assertEquals(model.getRegions(), 2);
-    assertEquals(model.getRequests(), 0);
-    assertEquals(model.getAverageLoad(), 1.0);
+    assertEquals(2, model.getRegions());
+    assertEquals(0, model.getRequests());
+    assertEquals(1.0, model.getAverageLoad(), 0.0);
     Iterator<StorageClusterStatusModel.Node> nodes =
       model.getLiveNodes().iterator();
     StorageClusterStatusModel.Node node = nodes.next();
-    assertEquals(node.getName(), "test1");
-    assertEquals(node.getStartCode(), 1245219839331L);
-    assertEquals(node.getHeapSizeMB(), 128);
-    assertEquals(node.getMaxHeapSizeMB(), 1024);
+    assertEquals("test1", node.getName());
+    assertEquals(1245219839331L, node.getStartCode());
+    assertEquals(128, node.getHeapSizeMB());
+    assertEquals(1024, node.getMaxHeapSizeMB());
     Iterator<StorageClusterStatusModel.Node.Region> regions =
       node.getRegions().iterator();
     StorageClusterStatusModel.Node.Region region = regions.next();
     assertTrue(Bytes.toString(region.getName()).equals(
         "hbase:root,,0"));
-    assertEquals(region.getStores(), 1);
-    assertEquals(region.getStorefiles(), 1);
-    assertEquals(region.getStorefileSizeMB(), 0);
-    assertEquals(region.getMemStoreSizeMB(), 0);
-    assertEquals(region.getStorefileIndexSizeKB(), 0);
-    assertEquals(region.getReadRequestsCount(), 1);
-    assertEquals(region.getWriteRequestsCount(), 2);
-    assertEquals(region.getRootIndexSizeKB(), 1);
-    assertEquals(region.getTotalStaticIndexSizeKB(), 1);
-    assertEquals(region.getTotalStaticBloomSizeKB(), 1);
-    assertEquals(region.getTotalCompactingKVs(), 1);
-    assertEquals(region.getCurrentCompactedKVs(), 1);
+    assertEquals(1, region.getStores());
+    assertEquals(1, region.getStorefiles());
+    assertEquals(0, region.getStorefileSizeMB());
+    assertEquals(0, region.getMemStoreSizeMB());
+    assertEquals(0, region.getStorefileIndexSizeKB());
+    assertEquals(1, region.getReadRequestsCount());
+    assertEquals(2, region.getWriteRequestsCount());
+    assertEquals(1, region.getRootIndexSizeKB());
+    assertEquals(1, region.getTotalStaticIndexSizeKB());
+    assertEquals(1, region.getTotalStaticBloomSizeKB());
+    assertEquals(1, region.getTotalCompactingKVs());
+    assertEquals(1, region.getCurrentCompactedKVs());
     assertFalse(regions.hasNext());
     node = nodes.next();
-    assertEquals(node.getName(), "test2");
-    assertEquals(node.getStartCode(), 1245239331198L);
-    assertEquals(node.getHeapSizeMB(), 512);
-    assertEquals(node.getMaxHeapSizeMB(), 1024);
+    assertEquals("test2", node.getName());
+    assertEquals(1245239331198L, node.getStartCode());
+    assertEquals(512, node.getHeapSizeMB());
+    assertEquals(1024, node.getMaxHeapSizeMB());
     regions = node.getRegions().iterator();
     region = regions.next();
     assertEquals(Bytes.toString(region.getName()),
         TableName.META_TABLE_NAME+",,1246000043724");
-    assertEquals(region.getStores(), 1);
-    assertEquals(region.getStorefiles(), 1);
-    assertEquals(region.getStorefileSizeMB(), 0);
-    assertEquals(region.getMemStoreSizeMB(), 0);
-    assertEquals(region.getStorefileIndexSizeKB(), 0);
-    assertEquals(region.getReadRequestsCount(), 1);
-    assertEquals(region.getWriteRequestsCount(), 2);
-    assertEquals(region.getRootIndexSizeKB(), 1);
-    assertEquals(region.getTotalStaticIndexSizeKB(), 1);
-    assertEquals(region.getTotalStaticBloomSizeKB(), 1);
-    assertEquals(region.getTotalCompactingKVs(), 1);
-    assertEquals(region.getCurrentCompactedKVs(), 1);
+    assertEquals(1, region.getStores());
+    assertEquals(1, region.getStorefiles());
+    assertEquals(0, region.getStorefileSizeMB());
+    assertEquals(0, region.getMemStoreSizeMB());
+    assertEquals(0, region.getStorefileIndexSizeKB());
+    assertEquals(1, region.getReadRequestsCount());
+    assertEquals(2, region.getWriteRequestsCount());
+    assertEquals(1, region.getRootIndexSizeKB());
+    assertEquals(1, region.getTotalStaticIndexSizeKB());
+    assertEquals(1, region.getTotalStaticBloomSizeKB());
+    assertEquals(1, region.getTotalCompactingKVs());
+    assertEquals(1, region.getCurrentCompactedKVs());
 
     assertFalse(regions.hasNext());
     assertFalse(nodes.hasNext());

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
index 8c7e22b..eb36fd5 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
@@ -19,6 +19,8 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.junit.experimental.categories.Category;
@@ -36,14 +38,16 @@ public class TestStorageClusterVersionModel extends TestModelBase<StorageCluster
     AS_JSON = "{\"Version\": \"0.0.1-testing\"}";
   }
 
+  @Override
   protected StorageClusterVersionModel buildTestModel() {
     StorageClusterVersionModel model = new StorageClusterVersionModel();
     model.setVersion(VERSION);
     return model;
   }
 
+  @Override
   protected void checkModel(StorageClusterVersionModel model) {
-    assertEquals(model.getVersion(), VERSION);
+    assertEquals(VERSION, model.getVersion());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
index a061b31..c529671 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
@@ -19,6 +19,10 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Iterator;
 
 import org.apache.hadoop.hbase.testclassification.RestTests;
@@ -55,6 +59,7 @@ public class TestTableInfoModel extends TestModelBase<TableInfoModel>
{
       "startKey\":\"YWJyYWNhZGJyYQ==\"}]}";
   }
 
+  @Override
   protected TableInfoModel buildTestModel() {
     TableInfoModel model = new TableInfoModel();
     model.setName(TABLE);
@@ -62,25 +67,29 @@ public class TestTableInfoModel extends TestModelBase<TableInfoModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(TableInfoModel model) {
-    assertEquals(model.getName(), TABLE);
+    assertEquals(TABLE, model.getName());
     Iterator<TableRegionModel> regions = model.getRegions().iterator();
     TableRegionModel region = regions.next();
     assertTrue(Bytes.equals(region.getStartKey(), START_KEY));
     assertTrue(Bytes.equals(region.getEndKey(), END_KEY));
-    assertEquals(region.getId(), ID);
-    assertEquals(region.getLocation(), LOCATION);
+    assertEquals(ID, region.getId());
+    assertEquals(LOCATION, region.getLocation());
     assertFalse(regions.hasNext());
   }
 
+  @Override
   public void testBuildModel() throws Exception {
     checkModel(buildTestModel());
   }
 
+  @Override
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }
 
+  @Override
   public void testFromPB() throws Exception {
     checkModel(fromPB(AS_PB));
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
index f20486d..0cf8915 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
@@ -19,6 +19,9 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
 import java.util.Iterator;
 
 import org.apache.hadoop.hbase.testclassification.RestTests;
@@ -44,6 +47,7 @@ public class TestTableListModel extends TestModelBase<TableListModel>
{
       "{\"table\":[{\"name\":\"table1\"},{\"name\":\"table2\"},{\"name\":\"table3\"}]}";
   }
 
+  @Override
   protected TableListModel buildTestModel() {
     TableListModel model = new TableListModel();
     model.add(new TableModel(TABLE1));
@@ -52,14 +56,15 @@ public class TestTableListModel extends TestModelBase<TableListModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(TableListModel model) {
     Iterator<TableModel> tables = model.getTables().iterator();
     TableModel table = tables.next();
-    assertEquals(table.getName(), TABLE1);
+    assertEquals(TABLE1, table.getName());
     table = tables.next();
-    assertEquals(table.getName(), TABLE2);
+    assertEquals(TABLE2, table.getName());
     table = tables.next();
-    assertEquals(table.getName(), TABLE3);
+    assertEquals(TABLE3, table.getName());
     assertFalse(tables.hasNext());
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
index d592381..ea49515 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
@@ -19,11 +19,16 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
-import org.apache.hadoop.hbase.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 import org.apache.hadoop.hbase.util.Bytes;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 @Category({RestTests.class, SmallTests.class})
@@ -49,22 +54,25 @@ public class TestTableRegionModel extends TestModelBase<TableRegionModel>
{
           "startKey\":\"YWJyYWNhZGJyYQ==\"}";
   }
 
+  @Override
   protected TableRegionModel buildTestModel() {
     TableRegionModel model =
       new TableRegionModel(TABLE, ID, START_KEY, END_KEY, LOCATION);
     return model;
   }
 
+  @Override
   protected void checkModel(TableRegionModel model) {
     assertTrue(Bytes.equals(model.getStartKey(), START_KEY));
     assertTrue(Bytes.equals(model.getEndKey(), END_KEY));
-    assertEquals(model.getId(), ID);
-    assertEquals(model.getLocation(), LOCATION);
+    assertEquals(ID, model.getId());
+    assertEquals(LOCATION, model.getLocation());
     assertEquals(model.getName(), 
       TABLE + "," + Bytes.toString(START_KEY) + "," + Long.toString(ID) +
       ".ad9860f031282c46ed431d7af8f94aca.");
   }
 
+  @Test
   public void testGetName() {
     TableRegionModel model = buildTestModel();
     String modelName = model.getName();
@@ -73,6 +81,7 @@ public class TestTableRegionModel extends TestModelBase<TableRegionModel>
{
     assertEquals(modelName, hri.getRegionNameAsString());
   }
 
+  @Test
   public void testSetName() {
     TableRegionModel model = buildTestModel();
     String name = model.getName();

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
index 81de436..55d149a 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
@@ -19,13 +19,16 @@
 
 package org.apache.hadoop.hbase.rest.model;
 
-import java.util.Iterator;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
-import javax.xml.bind.JAXBContext;
+import java.util.Iterator;
 
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
 
+import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -41,8 +44,6 @@ public class TestTableSchemaModel extends TestModelBase<TableSchemaModel>
{
 
   TestColumnSchemaModel testColumnSchemaModel;
 
-  private JAXBContext context;
-
   public TestTableSchemaModel() throws Exception {
     super(TableSchemaModel.class);
     testColumnSchemaModel = new TestColumnSchemaModel();
@@ -67,6 +68,7 @@ public class TestTableSchemaModel extends TestModelBase<TableSchemaModel>
{
       "\"COMPRESSION\":\"GZ\",\"VERSIONS\":\"1\",\"TTL\":\"86400\",\"IN_MEMORY\":\"false\"}]}";
   }
 
+  @Override
   protected TableSchemaModel buildTestModel() {
     return buildTestModel(TABLE_NAME);
   }
@@ -81,15 +83,16 @@ public class TestTableSchemaModel extends TestModelBase<TableSchemaModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(TableSchemaModel model) {
     checkModel(model, TABLE_NAME);
   }
 
   public void checkModel(TableSchemaModel model, String tableName) {
     assertEquals(model.getName(), tableName);
-    assertEquals(model.__getIsMeta(), IS_META);
-    assertEquals(model.__getIsRoot(), IS_ROOT);
-    assertEquals(model.__getReadOnly(), READONLY);
+    assertEquals(IS_META, model.__getIsMeta());
+    assertEquals(IS_ROOT, model.__getIsRoot());
+    assertEquals(READONLY, model.__getReadOnly());
     Iterator<ColumnSchemaModel> families = model.getColumns().iterator();
     assertTrue(families.hasNext());
     ColumnSchemaModel family = families.next();
@@ -97,14 +100,20 @@ public class TestTableSchemaModel extends TestModelBase<TableSchemaModel>
{
     assertFalse(families.hasNext());
   }
 
+  @Override
+  @Test
   public void testBuildModel() throws Exception {
     checkModel(buildTestModel());
   }
 
+  @Override
+  @Test
   public void testFromXML() throws Exception {
     checkModel(fromXML(AS_XML));
   }
 
+  @Override
+  @Test
   public void testFromPB() throws Exception {
     checkModel(fromPB(AS_PB));
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/aeffca49/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
index 081f7a0..c3e7a4c 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
@@ -18,15 +18,11 @@
  */
 package org.apache.hadoop.hbase.rest.model;
 
+import static org.junit.Assert.assertEquals;
+
 import org.apache.hadoop.hbase.testclassification.RestTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
-
-import org.junit.Assume;
-import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
-
-import javax.servlet.ServletContext;
 
 @Category({RestTests.class, SmallTests.class})
 public class TestVersionModel extends TestModelBase<VersionModel> {
@@ -55,6 +51,7 @@ public class TestVersionModel extends TestModelBase<VersionModel>
{
           "REST\":\"0.0.1\",\"Server\":\"6.1.14\"}";
   }
 
+  @Override
   protected VersionModel buildTestModel() {
     VersionModel model = new VersionModel();
     model.setRESTVersion(REST_VERSION);
@@ -65,12 +62,13 @@ public class TestVersionModel extends TestModelBase<VersionModel>
{
     return model;
   }
 
+  @Override
   protected void checkModel(VersionModel model) {
-    assertEquals(model.getRESTVersion(), REST_VERSION);
-    assertEquals(model.getOSVersion(), OS_VERSION);
-    assertEquals(model.getJVMVersion(), JVM_VERSION);
-    assertEquals(model.getServerVersion(), JETTY_VERSION);
-    assertEquals(model.getJerseyVersion(), JERSEY_VERSION);
+    assertEquals(REST_VERSION, model.getRESTVersion());
+    assertEquals(OS_VERSION, model.getOSVersion());
+    assertEquals(JVM_VERSION, model.getJVMVersion());
+    assertEquals(JETTY_VERSION, model.getServerVersion());
+    assertEquals(JERSEY_VERSION, model.getJerseyVersion());
   }
 }
 


Mime
View raw message