### Question:
UserServiceImpl implements UserService { @Override public UserEntity register(RegisterReq registerReq) { checkParam(registerReq); UserEntity userEntity = buildUserEntity(registerReq); userDAO.createUser(userEntity); return userEntity; }  @Override UserEntity login(LoginReq loginReq); @Override List<UserEntity> findUsers(UserQueryReq userQueryReq); @Override UserEntity register(RegisterReq registerReq); @Override void batchUpdateUserState(BatchReq<UserStateReq> userStateReqs); @Override void createAdminUser(AdminCreateReq adminCreateReq); @Override List<RoleEntity> findRoles(); @Override void deleteRole(String roleId); @Override void updateMenuOfRole(RoleMenuReq roleMenuReq); @Override void updatePermissionOfRole(RolePermissionReq rolePermissionReq); @Override List<PermissionEntity> findPermissions(); @Override List<MenuEntity> findMenus(); @Override List<LocationEntity> findLocations(String userId); @Override String createLocation(LocationCreateReq locationCreateReq, String userId); @Override void deleteLocation(String locationId, String userId); @Override void modifyLocation(LocationUpdateReq locationUpdateReq, String userId);  }### Answer:
@Test public void registerPerson() throws Exception { RegisterReq registerReq = new RegisterReq(); registerReq.setPhone("15251896025"); registerReq.setPassword("123"); registerReq.setMail("xxxx@qq.com"); registerReq.setUserType(UserTypeEnum.Person.getCode()); registerReq.setLicencePic("xxx.jpg"); UserEntity userEntity = userService.register(registerReq); System.out.println(userEntity); }
@Test public void registerCompany() throws Exception { RegisterReq registerReq = new RegisterReq(); registerReq.setPhone("15251896026"); registerReq.setPassword("123"); registerReq.setMail("xxxx@qq.com"); registerReq.setUsername("高喜"); registerReq.setUserType(UserTypeEnum.Company.getCode()); registerReq.setLicencePic("xxx.jpg"); UserEntity userEntity = userService.register(registerReq); System.out.println(userEntity); }