CDKAtomColors implements IAtomColorer { @Override public Color getAtomColor(IAtom atom) { return getAtomColor(atom, DEFAULT); }  @Override Color getAtomColor(IAtom atom); @Override Color getAtomColor(IAtom atom, Color defaultColor);  }
@Test public void testGetAtomColor() { CDKAtomColors colors = new CDKAtomColors(); Assert.assertNotNull(colors); IAtom hydrogen = new Atom("H"); hydrogen.setAtomicNumber(1); Assert.assertEquals(Color.white, colors.getAtomColor(hydrogen)); IAtom helium = new Atom("He"); helium.setAtomicNumber(2); Assert.assertEquals(Color.darkGray, colors.getAtomColor(helium)); }
@Test public void testGetDefaultAtomColor() { CDKAtomColors colors = new CDKAtomColors(); Assert.assertNotNull(colors); IAtom imaginary = new PseudoAtom("Ix"); Assert.assertEquals(Color.ORANGE, colors.getAtomColor(imaginary, Color.ORANGE)); }