@Test public void testGetRole_admin() throws Exception { Role actual = roleService.getRole(RoleEnum.ADMIN); Role expected = new Role(RoleEnum.ADMIN.getRoleName()); assertReflectionEquals(expected, actual, ReflectionComparatorMode.IGNORE_DEFAULTS); }
@Test public void testFindAll() throws Exception { Map<Long, Role> actual = roleService.findAll(); Map<Long, Role> expected = ImmutableMap.of( RoleEnum.USER.getId(), new Role(RoleEnum.USER.getRoleName()), RoleEnum.ADMIN.getId(), new Role(RoleEnum.ADMIN.getRoleName())); assertReflectionEquals(expected, actual, ReflectionComparatorMode.IGNORE_DEFAULTS); }