### Question:
ApacheErrorLogPlugin extends LogFileTailPlugin { public TrackEvent processLine(FileInfo info, String line) { ApacheErrorLogEntry entry = new ApacheErrorLogEntry(); if (!entry.parse(line)) { return null; } return newTrackEvent(System.currentTimeMillis(), entry.level.toLowerCase(), info.getName(), entry.message); }  String[] getLogLevelAliases(); TrackEvent processLine(FileInfo info, String line);  }### Answer:
@Test public void parseAllLowerCaseLevel() { String line = "[Wed Jan 21 20:47:35 2004] [error] This is a test message"; TrackEvent event = plugin.processLine(mockFileInfo, line); assertNotNull(event); assertEquals(3, event.getLevel()); assertEquals("This is a test message", event.getMessage()); }
@Test public void parseAllUpperCaseLevel() { String line = "[Wed Jan 21 20:47:35 2004] [ERROR] This is a test message"; TrackEvent event = plugin.processLine(mockFileInfo, line); assertNotNull(event); assertEquals(3, event.getLevel()); assertEquals("This is a test message", event.getMessage()); }
@Test public void parseMixedCaseLevel() { String line = "[Wed Jan 21 20:47:35 2004] [Error] This is a test message"; TrackEvent event = plugin.processLine(mockFileInfo, line); assertNotNull(event); assertEquals(3, event.getLevel()); assertEquals("This is a test message", event.getMessage()); }