コード例 #1
0
  private void givenUserFound() {

    Mockito.when(mockUserService.loginUser(expectedUser, expectedPass))
        .thenReturn(new AccessToken(new User()));
  }
コード例 #2
0
 private void givenUserNotFound() {
   Mockito.when(mockUserService.loginUser(expectedUser, expectedPass)).thenReturn(null);
 }