public void testCascadeSave() {
// Create the manager:
ManagerImpl man1 = new ManagerImpl("m1");
// Create an employee and add it to the manager:
EmployeeImpl emp1 = new EmployeeImpl("a1");
man1.addManagedEmployee(emp1);
// Save the manager and the employee by cascade:
this.template.save(man1);
// The employee saved by cascade has a not null id:
assertNotNull(emp1.getId());