private static void assertSortedEquals(String expected, String actual) {
    char[] expectedChars = expected.toCharArray();
    Arrays.sort(expectedChars);
    char[] actualChars = actual.toCharArray();
    Arrays.sort(actualChars);
    assertEquals(String.valueOf(expectedChars), String.valueOf(actualChars));
  }
Class which provides several useful methods to test commands, but is itself not a test.
hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/repl/CommandTestUtils.java