public void testOutsideScreen() throws Exception {
xmin = 0;
ymin = 0;
width = 10;
height = 10;
ScreenMap map = new ScreenMap(xmin, ymin, width, height);
// check points outside the screen
assertFalse(map.checkAndSet(-10, -10));
assertFalse(map.checkAndSet(-10, -10));
assertFalse(map.checkAndSet(-10, 10));
assertFalse(map.checkAndSet(-10, 10));
assertFalse(map.checkAndSet(20, 10));
assertFalse(map.checkAndSet(20, 10));
assertFalse(map.checkAndSet(20, -10));
assertFalse(map.checkAndSet(20, -10));
// compare with one inside
assertFalse(map.checkAndSet(0, 0));
assertTrue(map.checkAndSet(0, 0));
}