### Question:
CoberturaLine { public boolean equals(Object other) { if (!(other instanceof CoberturaLine)) { return false; } CoberturaLine otherLine = (CoberturaLine) other; return otherLine.getHits() == getHits() && otherLine.getNumber() == getNumber() && otherLine.isCondition() == isCondition(); } CoberturaLine(int number, int hits, boolean condition, boolean conditionCompletelyCovered); int getNumber(); int getHits(); boolean isCondition(); boolean isConditionCompletelyCovered(); boolean equals(Object other); Boolean isCovered(); List<CoberturaCondition> getConditions(); void addCondition(CoberturaCondition cCondition);  }### Answer:
@Test public void testEquals() { CoberturaLine line1 = new CoberturaLine(1, 2, false, false); assertFalse(line1.equals(null)); assertFalse(line1.equals(10)); assertTrue(line1.equals(line1)); CoberturaLine line2 = new CoberturaLine(2, 2, false, false); assertFalse(line1.equals(line2)); line2 = new CoberturaLine(1, 1, false, false); assertFalse(line1.equals(line2)); line2 = new CoberturaLine(1, 2, true, false); assertFalse(line1.equals(line2)); line2 = new CoberturaLine(1, 2, false, false); assertTrue(line1.equals(line2)); }