/**
* Some general checks for the lookup table.
*/
public void testGeneral() {
LookupPaintScale s = new LookupPaintScale(0.0, 100.0, Color.black);
assertEquals(Color.black, s.getPaint(-1.0));
assertEquals(Color.black, s.getPaint(0.0));
assertEquals(Color.black, s.getPaint(50.0));
assertEquals(Color.black, s.getPaint(100.0));
assertEquals(Color.black, s.getPaint(101.0));
s.add(new Double(50.0), Color.blue);
assertEquals(Color.black, s.getPaint(-1.0));
assertEquals(Color.black, s.getPaint(0.0));
assertEquals(Color.blue, s.getPaint(50.0));
assertEquals(Color.blue, s.getPaint(100.0));
assertEquals(Color.black, s.getPaint(101.0));
s.add(new Double(50.0), Color.red);
assertEquals(Color.black, s.getPaint(-1.0));
assertEquals(Color.black, s.getPaint(0.0));
assertEquals(Color.red, s.getPaint(50.0));
assertEquals(Color.red, s.getPaint(100.0));
assertEquals(Color.black, s.getPaint(101.0));
s.add(new Double(25.0), Color.green);
assertEquals(Color.black, s.getPaint(-1.0));
assertEquals(Color.black, s.getPaint(0.0));
assertEquals(Color.green, s.getPaint(25.0));
assertEquals(Color.red, s.getPaint(50.0));
assertEquals(Color.red, s.getPaint(100.0));
assertEquals(Color.black, s.getPaint(101.0));
s.add(new Double(75.0), Color.yellow);
assertEquals(Color.black, s.getPaint(-1.0));
assertEquals(Color.black, s.getPaint(0.0));
assertEquals(Color.green, s.getPaint(25.0));
assertEquals(Color.red, s.getPaint(50.0));
assertEquals(Color.yellow, s.getPaint(75.0));
assertEquals(Color.yellow, s.getPaint(100.0));
assertEquals(Color.black, s.getPaint(101.0));
}