@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); }
@Test public void testGetRole_user() throws Exception { Role actual = roleService.getRole(RoleEnum.USER); Role expected = new Role(RoleEnum.USER.getRoleName()); assertReflectionEquals(expected, actual, ReflectionComparatorMode.IGNORE_DEFAULTS); }