@Test public void shouldReturnTrueIfUserHasReportingRight(){ Long userId = 1L; when(rightService.hasReportingRight(userId)).thenReturn(true); assertThat(evaluator.hasReportingPermission(userId),is(true)); verify(rightService).hasReportingRight(userId); }
public Boolean hasReportingPermission(Long userId) { return rightService.hasReportingRight(userId); }
PermissionEvaluator { public Boolean hasReportingPermission(Long userId) { return rightService.hasReportingRight(userId); } }
PermissionEvaluator { public Boolean hasReportingPermission(Long userId) { return rightService.hasReportingRight(userId); }  }
PermissionEvaluator { public Boolean hasReportingPermission(Long userId) { return rightService.hasReportingRight(userId); }  Boolean hasPermission(Long userId, String commaSeparatedRights); Boolean hasReportingPermission(Long userId); }
PermissionEvaluator { public Boolean hasReportingPermission(Long userId) { return rightService.hasReportingRight(userId); }  Boolean hasPermission(Long userId, String commaSeparatedRights); Boolean hasReportingPermission(Long userId);  }