SeverityComparator implements Comparator<LogRecord>, Serializable { @Override public boolean equals(final Object o) { return o == null ? false : o.getClass() == getClass(); }  Throwable apply(final Throwable chain); final int applyThenCompare(Throwable tc1, Throwable tc2); int compareThrowable(final Throwable t1, final Throwable t2); int compare(final LogRecord o1, final LogRecord o2); @Override boolean equals(final Object o); @Override int hashCode(); boolean isNormal(final Throwable t);  }
@Test @SuppressWarnings("ObjectEqualsNull") public void testEquals() { final SeverityComparator a = new SeverityComparator(); final SeverityComparator b = new SeverityComparator(); assertNotSame(a, b); assertNotNull(a); assertFalse(a.equals(null)); assertNotNull(b); assertFalse(b.equals(null)); assertTrue(a.equals(a)); assertTrue(b.equals(b)); assertTrue(a.equals(b)); assertTrue(b.equals(a)); }