LinuxSyslogLineParser { private String toString(Matcher m, int group) { return (group == 0) ? "" : m.group(group); }  static boolean isSyslogNgRestarted(String compId, String body); static boolean isSyslogNgRestarted(IMessageInstance mi); static Pattern getSysLogSuppressionPattern(); abstract boolean parseLine(String line); final LinuxAdeExtProperties getLinuxAdeExtProperties(); abstract Date toDate(String source, String s); abstract DateTime getLastDeterminedDateTime(); final Date getMsgTime(); final String getSource(); final String getComponent(); final Severity getSeverity(); final String getPid(); final String getMessageBody(); final void setParseQualityReport(IParsingQualityReporter parsingQualityReport); @Override String toString(); static final String SYSLOG_NG_COMPONENT_NAME; static final String SYSLOG_NG_STARTING; static final Pattern SYSLOG_NG_STARTING_PATTERN; static final String SYSLOG_MESSAGE_SUPPRESSION; static final Pattern SYSLOG_MESSAGE_SUPPRESSION_PATTERN; }
@Test public void testToString() { Pattern pattern = Pattern.compile("^([^:]+):.*COMMAND=(.*)$"); lslp.parseLine(pattern,2,2,2,2,2,"(username):.COMMAND=nub"); assertEquals("Testing to String works correctly " , "timestamp=(null) " + "hostname=(nub) " + "comp=(nub) " + "pid=(nub) " + "msg=(nub)" ,lslp.toString()); }