### Question:
EmployeeRestService { @PUT public Employee updateEmployee(Employee employee){ employee.setEname("乔布斯"); employee.getDepartment().setDeptname("apple"); return employee; }  @Path("/v1") @GET List<Employee> getEmployees(); @Path("{id}") @GET Employee getEmployee(@PathParam("id")int id); @POST Employee saveEmployee(Employee employee); @PUT Employee updateEmployee(Employee employee); @DELETE @Path("{id}") Employee deleteEmployee(@PathParam("id")int id);  }### Answer:
@Test public void testUpdateEmployee(){ Department department = new Department(1,"研发部"); Employee employee = new Employee(1,"scott",department); Response response = target("employee").request().put(Entity.entity(employee,MediaType.APPLICATION_XML)); System.out.println(response.getStatus()); System.out.println(response.readEntity(String.class)); }