### Question:
ResourceService implements IResourceService { @Override public Set<Resource> queryByRoleCodes(String[] roleCodes) { return resourceMapper.queryByRoleCodes(roleCodes); }  @Override Set<Resource> findAll(); @Override Set<Resource> queryByRoleCodes(String[] roleCodes);  }### Answer:
@Test public void testQueryByRoleCodes_假如存在角色ADMIN_当传入ADMIN时_那么可以获取到角色拥有的资源集合() { Set<Resource> resources = resourceService.queryByRoleCodes(new String[]{"ADMIN"}); Assert.assertThat(resources.size(), greaterThan(2)); }
@Test public void testQueryByRoleCodes_假如不存在角色NOTHING_当传入NOTHING时_那么获取不到资源信息() { Set<Resource> resources = resourceService.queryByRoleCodes(new String[]{"NOTHING"}); Assert.assertEquals(0, resources.size()); }