IdClassExampleEmployee emp = new IdClassExampleEmployee();
emp.setDepartment(dep);
employeeRepositoryWithIdClass.save(emp);
IdClassExampleEmployeePK key = new IdClassExampleEmployeePK();
key.setDepartment(dep.getDepartmentId());
key.setEmpId(emp.getEmpId());
IdClassExampleEmployee persistedEmp = employeeRepositoryWithIdClass.findOne(key);
assertThat(persistedEmp, is(notNullValue()));
assertThat(persistedEmp.getDepartment(), is(notNullValue()));
assertThat(persistedEmp.getDepartment().getName(), is(dep.getName()));