@Test
  public void checkClasses() throws Exception {
    List<Class<?>> badClasses = new java.util.ArrayList<>();
    ClassTestFinder classFinder = new ClassTestFinder();
    for (Class<?> c : classFinder.findClasses(false)) {
      if (ClassTestFinder.getCategoryAnnotations(c).length == 0) {
        badClasses.add(c);
      }
    }
    assertTrue("There are " + badClasses.size() + " test classes without category: " + badClasses,
      badClasses.isEmpty());
  }
Throws an assertion if we find a test class without category (small/medium/large/integration).
List all the test classes without category in the assertion message.
hbase-server/src/test/java/org/apache/hadoop/hbase/TestCheckTestClasses.java