@Test
public void testGetWaterFraction() throws Exception {

    final Watermask watermask = new Watermask();
    final PixelLocator geographic = new PixelLocator() {
        @Override
        public boolean getGeoLocation(double x, double y, Point2D g) {
            g.setLocation(x, y);
            return true;
        }
        @Override
        public boolean getPixelLocation(double lon, double lat, Point2D p) {
            return false;
        }
    };
    assertEquals(100, watermask.getWaterFraction(0, 0, geographic, 11, 11));
    assertEquals(0, watermask.getWaterFraction(20, 0, geographic, 11, 11));
}