@Test
public void testFilterMap() {

  Map<String, String> testMap = getTestMap();
  ResourceListQueryImpl query = new ResourceListQueryImpl();
  query.setLimit(3);
  query.setOffset(0);
  assertEquals(3, filterMap(testMap, query).size());
  query.setLimit(0);
  query.setOffset(testMap.size());
  assertEquals(0, filterMap(testMap, query).size());
  query.setLimit(6);
  query.setOffset(testMap.size() - 3);
  assertEquals(3, filterMap(testMap, query).size());
}