@Test
  @SuppressWarnings("rawtypes")
  public void testOperationSubClassMethodsAreBuilderStyle() {
    /*
     * All Operation subclasses should have a builder style setup where setXXX/addXXX methods can be
     * chainable together: . For example: Scan scan = new Scan() .setFoo(foo) .setBar(bar)
     * .setBuz(buz) This test ensures that all methods starting with "set" returns the declaring
     * object
     */

    // TODO: We should ensure all subclasses of Operation is checked.
    Class[] classes = new Class[] { Operation.class, OperationWithAttributes.class, Mutation.class,
      Query.class, Delete.class, Increment.class, Append.class, Put.class, Get.class, Scan.class };

    BuilderStyleTest.assertClassesAreBuilderStyle(classes);
  }
Test the client Scan Operations' JSON encoding to ensure that produced JSON is parseable and
that the details are present and not corrupted.
@throws IOException if the JSON conversion fails
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java