AtomTypeHybridizationDifference implements IDifference { public static IDifference construct(String name, IAtomType.Hybridization first, IAtomType.Hybridization second) { if (first == second) { return null; } return new AtomTypeHybridizationDifference(name, first, second); } private  AtomTypeHybridizationDifference(String name, IAtomType.Hybridization first, IAtomType.Hybridization second); static IDifference construct(String name, IAtomType.Hybridization first, IAtomType.Hybridization second); @Override String toString();  }
@Test public void testDiff() { IDifference result = AtomTypeHybridizationDifference.construct("Foo", IAtomType.Hybridization.SP1, IAtomType.Hybridization.SP2); Assert.assertNotNull(result); }
@Test public void testSame() { IDifference result = AtomTypeHybridizationDifference.construct("Foo", IAtomType.Hybridization.SP1, IAtomType.Hybridization.SP1); Assert.assertNull(result); }
@Test public void testTwoNull() { IDifference result = AtomTypeHybridizationDifference.construct("Foo", null, null); Assert.assertNull(result); }
@Test public void testOneNull() { IDifference result = AtomTypeHybridizationDifference.construct("Foo", null, IAtomType.Hybridization.SP1); Assert.assertNotNull(result); result = AtomTypeHybridizationDifference.construct("Foo", IAtomType.Hybridization.SP1, null); Assert.assertNotNull(result); }