### Question:
Watermask { public boolean isWater(double lon, double lat) { final int x = gridDef.getGridX(lon, true); final int y = gridDef.getGridY(lat, true); return Container.WATERMASK_IMAGE.getRaster().getSample(x, y, 0) != 0; } Watermask(); boolean isWater(double lon, double lat); byte getWaterFraction(int x, int y, PixelLocator locator, int stepCountX, int stepCountY); static final byte INVALID_WATER_FRACTION; }### Answer:
@Test public void testIsWater() throws Exception { final Watermask watermask = new Watermask(); assertTrue(watermask.isWater(0.0, 0.0)); assertFalse(watermask.isWater(20.0, 0.0)); }