JsErrorLog implements Serializable, Comparable<JsErrorLog> { @Override public boolean equals(Object obj) { boolean result = false; if (obj == this) { result = true; } else if (obj != null && obj.getClass() == this.getClass()) { JsErrorLog other = (JsErrorLog) obj; result = Objects.equals(errorMessage, other.errorMessage) && Objects.equals(sourceName, other.sourceName) && Objects.equals(lineNumber, other.lineNumber); } return result; } JsErrorLog(String errorMessage, String sourceName, int lineNumber); String getErrorMessage(); String getSourceName(); int getLineNumber(); boolean isIgnored(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(JsErrorLog o); void addMatchedFilter(FilterInfo matchedFilterInfo);  }
@Test public void testEqualsWhenOnlyErrorMessageDiffersThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(new JsErrorLog("Other error message", "source.js", 1))); }
@Test public void testEqualsWhenOnlySourceDiffersThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(new JsErrorLog("Error message", "other_source.js", 1))); }
@Test public void testEqualsWhenOnlyLineNumberDiffersThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(new JsErrorLog("Error message", "source.js", 2))); }
@Test public void testEqualsWhenErrorMessageAndSourceDifferThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(new JsErrorLog("Other error message", "other_source.js", 1))); }
@Test public void testEqualsWhenErrorMessageAndLineNumberDifferThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(new JsErrorLog("Other error message", "source.js", 2))); }
@Test public void testEqualsWhenSourceAndLineNumberDifferThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(new JsErrorLog("Error message", "other_source.js", 2))); }
@Test public void testEqualsWhenEverythingDiffersThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(new JsErrorLog("Other error message", "other_source.js", 2))); }
@Test public void testEqualsWithTheSameObjectThenExpectTrue() throws Exception { assertTrue(jsErrorLog.equals(jsErrorLog)); }
@Test public void testEqualsWithEqualObjectThenExpectTrue() throws Exception { assertTrue(jsErrorLog.equals(new JsErrorLog("Error message", "source.js", 1))); }
@Test public void testEqualsWithNullThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals(null)); }
@Test public void testEqualsWithOtherObjectThenExpectFalse() throws Exception { assertFalse(jsErrorLog.equals("xxxxxx")); }