System.out.println("\n\n==============Message In==============");
System.out.println(new String(messageIn));
System.out.println("======================================");
final ValidationResult results = Main.runSmooks(messageIn);
System.out.println("\n==============Validation Result=======");
System.out.println("Errors:");
for (OnFailResult result : results.getErrors()) {
RuleEvalResult rule = result.getFailRuleResult();
System.out.println("\t" + rule.getRuleName() + ": " + result.getMessage());
System.out.println("\tSwedish:");
System.out.println("\t" + result.getMessage(new Locale("sv", "SE")));
}
System.out.println("Warnings:");
for (OnFailResult result : results.getWarnings()) {
System.out.println("\t" + result.getMessage());
System.out.println("\tSwedish:");
System.out.println("\t" + result.getMessage(new Locale("sv", "SE")));
}