Skip to content

Instantly share code, notes, and snippets.

@Adrianvdh
Last active January 4, 2018 05:16
Show Gist options
  • Save Adrianvdh/63467b9d3efbec2e91091e7a662a78d8 to your computer and use it in GitHub Desktop.
Save Adrianvdh/63467b9d3efbec2e91091e7a662a78d8 to your computer and use it in GitHub Desktop.
@Test(expected = RuntimeException.class)
public void testFindByUsername_UsernameNotFound() {
String username = "kentb";
UserRepository userRepository = new UserRepositoryImpl();
//when
User user = userRepository.findByUsername(username);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment