NullGroupsMapping implements GroupMappingServiceProvider { @Override public List<String> getGroups(String user) { return Collections.emptyList(); }  @Override void cacheGroupsAdd(List<String> groups); @Override List<String> getGroups(String user); @Override void cacheGroupsRefresh();  }
@Test public void testGetGroups() { String user = "user"; List<String> expResult = Collections.emptyList(); List<String> result = ngm.getGroups(user); assertEquals("No groups should be returned", expResult, result); ngm.cacheGroupsAdd(Arrays.asList(new String[] {"group1", "group2"})); result = ngm.getGroups(user); assertEquals("No groups should be returned", expResult, result); ngm.cacheGroupsRefresh(); result = ngm.getGroups(user); assertEquals("No groups should be returned", expResult, result); }