### Question:
LogHandler { public static String evaluationId(String log) { String oneLinelog = log.replaceAll("\\s+", " "); String regex = ".*Evaluation-ID: ([^\\.\\s]+)\\..*"; if (!oneLinelog.matches(regex)) return ""; Matcher matcher = Pattern.compile(regex).matcher(oneLinelog); matcher.find(); return matcher.group(1); }  static List<URL> getUrls(ToolResults logs); static long getTime(List<String> logs); static boolean hasInputUrl(String log); static boolean isLog(String s); static UrlParts splitUrl(String url); static String serviceName(String log); static String evaluationId(String log);  }### Answer:
@Test public void testEvaluationId() throws NoSuchFieldException { String id = LogHandler .evaluationId("...\nEvaluation-ID: MyEvalId.\n bla\n blub"); assertEquals("MyEvalId", id); }
@Test public void testEvaluationIdNoId() throws NoSuchFieldException { String id = LogHandler.evaluationId("...\nEvaluation-ID: .\n bla\n blub"); assertEquals("", id); }
@Test public void testEvaluationIdWrongFormat() throws NoSuchFieldException { String id = LogHandler.evaluationId("...\nEvaluation-ID = MyEvalId.\n bla\n blub"); assertEquals("", id); id = LogHandler.evaluationId("...\nEvaluation-ID: MyEvalId \n bla.\n blub"); assertEquals("", id); }