@Test
  public void testBasicToString() {
    BasicProcedure p = new BasicProcedure();
    ProcedureState state = ProcedureState.RUNNABLE;
    p.setState(state);
    // Just assert that the toString basically works and has state in it.
    assertTrue(p.toString().contains(state.toString()));
    p = new DoublingStateStringBasicProcedure();
    p.setState(state);
    // Assert our override works and that we get double the state...
    String testStr = state.toString() + state.toString();
    assertTrue(p.toString().contains(testStr));
  }
Test that I can override the toString for its state value.
hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureToString.java