### Question:
UserService { public User get(long id) { return userRepository.findOne(Example.of(new User().setId(id))).orElse(null); } @Autowired  UserService(UserRepository userRepository, UserManagementProperties userManagementProperties); List<User> list(); User create(String name, String currency); User get(long id); String getTestProperty();  }### Answer:
@Test public void shouldFindOneUser() { final User bob = UserTestUtils.createBob(); when(userRepositoryMock.findOne(isA(Example.class))).thenReturn(Optional.of(bob)); final User user = testSubject.get(bob.getId()); assertThat(user).isEqualToComparingFieldByField(bob); }