public static class AllWithOutAnnotation {
}
@Test
public void withoutSuiteClassAnnotationProducesFailure() {
Result result = JUnitCore.runClasses(AllWithOutAnnotation.class);
assertEquals(1, result.getFailureCount());
String expected = String.format(
"class '%s' must have a SuiteClasses annotation",
AllWithOutAnnotation.class.getName());
assertEquals(expected, result.getFailures().get(0).getMessage());
}