}
String tapText = contents.toString();
TapConsumer consumer = TapConsumerFactory.makeTap13YamlConsumer();
TestSet tests = consumer.load(tapText);
for (int i = 0; i < tests.getNumberOfTestResults(); i++){
TestResult test = tests.getTestResult(i + 1);
System.out.print("Test " + test.getTestNumber() + " ");
System.out.print(test.getDescription() + " ");
System.out.println(test.getStatus());
Map<String, Object> diagnostic = test.getDiagnostic();
printMap(diagnostic, " ");
}
/*
Class c = TestResult.class;
for (Method method : c.getDeclaredMethods()) {
//if (method.getAnnotation(PostConstruct.class) != null) {
System.out.println(method.getName());
//}
}
*/
System.out.print(tests.getNumberOfTestResults() + " tests total. ");
if (tests.containsNotOk()){
System.out.println("Some tests failed :(");
}else{
System.out.println("ALL PASSED :D");
}