@Test
public void testRegionFilter() {

    Geomem<String, String> g = new Geomem<String, String>();
    Predicate<Info<String, String>> predicate = g.createRegionFilter(
            topLeftLat, topLeftLong, bottomRightLat, bottomRightLong);
    {
        // inside
        assertTrue(predicate.apply(createInfo(topLeftLat - 1,
                topLeftLong + 1)));
        // outside north
        assertFalse(predicate.apply(createInfo(topLeftLat + 1,
                topLeftLong + 1)));
        // outside west
        assertFalse(predicate.apply(createInfo(topLeftLat - 1,
                topLeftLong - 1)));
        // outside east
        assertFalse(predicate.apply(createInfo(topLeftLat - 1,
                bottomRightLong + 1)));
        // outside south
        assertFalse(predicate.apply(createInfo(bottomRightLat - 1,
                bottomRightLong - 1)));
    }
}