@Test public void findByIdTest() { User user = userService.findById(1); Assert.assertEquals("张三", user.getName()); Assert.assertEquals(new Integer(-1), user.getAge()); }
public User findById(Integer id) { return userRepository.getOne(id); }
UserService { public User findById(Integer id) { return userRepository.getOne(id); } }
UserService { public User findById(Integer id) { return userRepository.getOne(id); }  }
UserService { public User findById(Integer id) { return userRepository.getOne(id); }  User findById(Integer id); }
UserService { public User findById(Integer id) { return userRepository.getOne(id); }  User findById(Integer id);  }