}
@Test
public void save_cascadeMerge() {
Region region = new Region();
region.setId(1L);
region.setRegionWidgets(new ArrayList<RegionWidget>());
RegionWidget regionWidget = new RegionWidget();
regionWidget.setId(1L);
region.getRegionWidgets().add(regionWidget);
Region saved = repository.save(region);
manager.flush();
assertThat(saved.getRegionWidgets().size(), is(equalTo(1)));
RegionWidget actual = saved.getRegionWidgets().get(0);
assertThat(actual, is(not(sameInstance(regionWidget))));
assertThat(actual.getId(), is(equalTo(1L)));
}