SimpleOomage implements Oomage { public static SimpleOomage randomSimpleOomage() { int red = StdRandom.uniform(0, 51) * 5; int green = StdRandom.uniform(0, 51) * 5; int blue = StdRandom.uniform(0, 51) * 5; return new SimpleOomage(red, green, blue); } SimpleOomage(int r, int g, int b); @Override boolean equals(Object o); @Override void draw(double x, double y, double scalingFactor); static SimpleOomage randomSimpleOomage(); static void main(String[] args); String toString();  }
@Test public void testHashCodeDeterministic() { SimpleOomage so = SimpleOomage.randomSimpleOomage(); int hashCode = so.hashCode(); for (int i = 0; i < 100; i += 1) { assertEquals(hashCode, so.hashCode()); } }