RasmolColors implements IAtomColorer, java.io.Serializable { @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() { RasmolColors colors = new RasmolColors(); Assert.assertNotNull(colors); IAtom sulfur = new Atom("S"); Assert.assertEquals(new Color(255, 200, 50), colors.getAtomColor(sulfur)); IAtom helium = new Atom("He"); Assert.assertEquals(new Color(255, 192, 203), colors.getAtomColor(helium)); }
@Test public void testGetDefaultAtomColor() { RasmolColors colors = new RasmolColors(); Assert.assertNotNull(colors); IAtom imaginary = new PseudoAtom("Ix"); Assert.assertEquals(Color.ORANGE, colors.getAtomColor(imaginary, Color.ORANGE)); }