ProblemUtil { public static String getProblemKey(Problem problem) { if (problem != null) { return new StringBuilder(problem.getClass().getName()).append(".").append(problem.name()).toString(); } return null; } private  ProblemUtil(); static void checkProblem(Map<Problem, List<Object>> problems); static String getProblemKey(Problem problem); static String formatMessage(String pattern, Object[] params);  }
@Test public void testGetProblemKey() throws Exception { assertEquals("cz.datalite.exception.TestProblem.FOO", ProblemUtil.getProblemKey(TestProblem.FOO)); Assert.assertNull(ProblemUtil.getProblemKey(null)); }