### Question:
SourceValue implements Value { @Override public boolean equals(final Object value) { if (!(value instanceof SourceValue)) { return false; } SourceValue sourceValue = (SourceValue) value; return size == sourceValue.size && insns.equals(sourceValue.insns); } SourceValue(final int size);  SourceValue(final int size, final AbstractInsnNode insnNode);  SourceValue(final int size, final Set<AbstractInsnNode> insnSet); @Override int getSize(); @Override boolean equals(final Object value); @Override int hashCode(); final int size; final Set<AbstractInsnNode> insns; }### Answer:
@Test public void testEquals() { SourceValue nullValue = null; boolean equalsSame = new SourceValue(1).equals(new SourceValue(1)); boolean equalsValueWithDifferentSource = new SourceValue(1).equals(new SourceValue(1, new InsnNode(Opcodes.NOP))); boolean equalsValueWithDifferentValue = new SourceValue(1).equals(new SourceValue(2)); boolean equalsNull = new SourceValue(1).equals(nullValue); assertTrue(equalsSame); assertFalse(equalsValueWithDifferentSource); assertFalse(equalsValueWithDifferentValue); assertFalse(equalsNull); }
@Test public void testEquals() { assertEquals(new SourceValue(1), new SourceValue(1)); assertNotEquals(new SourceValue(1), new SourceValue(1, new InsnNode(Opcodes.NOP))); assertNotEquals(new SourceValue(1), new SourceValue(2)); assertNotEquals(new SourceValue(1), null); }