### Question:
BondDiff { public static String diff(IChemObject first, IChemObject second) { IDifference diff = difference(first, second); if (diff == null) { return ""; } else { return diff.toString(); } } private  BondDiff(); static String diff(IChemObject first, IChemObject second); static IDifference difference(IChemObject first, IChemObject second);  }### Answer:
@Test public void testMatchAgainstItself() { IBond bond1 = mock(IBond.class); String result = BondDiff.diff(bond1, bond1); assertZeroLength(result); }
@Test public void testDiff() { IAtom carbon = mock(IAtom.class); IAtom oxygen = mock(IAtom.class); when(carbon.getSymbol()).thenReturn("C"); when(oxygen.getSymbol()).thenReturn("O"); IBond bond1 = mock(IBond.class); IBond bond2 = mock(IBond.class); when(bond1.getOrder()).thenReturn(IBond.Order.SINGLE); when(bond2.getOrder()).thenReturn(IBond.Order.DOUBLE); when(bond1.getAtomCount()).thenReturn(2); when(bond2.getAtomCount()).thenReturn(2); when(bond1.getBegin()).thenReturn(carbon); when(bond1.getEnd()).thenReturn(carbon); when(bond2.getBegin()).thenReturn(carbon); when(bond2.getEnd()).thenReturn(oxygen); bond1.setOrder(IBond.Order.SINGLE); bond2.setOrder(IBond.Order.DOUBLE); String result = BondDiff.diff(bond1, bond2); Assert.assertNotNull(result); Assert.assertNotSame(0, result.length()); assertContains(result, "BondDiff"); assertContains(result, "SINGLE/DOUBLE"); assertContains(result, "AtomDiff"); assertContains(result, "C/O"); }