assumeTrue(aManager.getDelegate() instanceof MutableDataSource);
insertData((MutableDataSource) aManager.getDelegate(), new File(DATA_FILE));
// ============ test all cascade
Launch aNewLaunch = new Launch();
LaunchUsingProxy aNewLaunchWithProxy = new LaunchUsingProxy();
LaunchSite aNewSiteOne = new LaunchSite();
aNewSiteOne.setLabel(Arrays.asList("new launch site one"));
LaunchSite aNewSiteTwo = new LaunchSite();
aNewSiteTwo.setLabel(Arrays.asList("new launch site two"));
aNewLaunch.setLaunchSite(aNewSiteOne);
aNewLaunchWithProxy.setLaunchSite(aNewSiteOne);
aManager.persist(aNewLaunch);
assertTrue(aManager.contains(aNewLaunch));
assertTrue(aManager.find(Launch.class, aNewLaunch.getRdfId()).getLaunchSite().getRdfId().equals(aNewSiteOne.getRdfId()));
assertFalse(aManager.contains(aNewSiteOne));
aManager.persist(aNewLaunchWithProxy);
assertTrue(aManager.contains(aNewLaunchWithProxy));
assertTrue(aManager.find(LaunchUsingProxy.class, aNewLaunchWithProxy.getRdfId()).getLaunchSite().equals(aNewSiteOne));
assertTrue(aManager.contains(aNewSiteOne));
aNewLaunch.setLaunchSite(aNewSiteTwo);
aNewLaunchWithProxy.setLaunchSite(aNewSiteTwo);
aManager.merge(aNewLaunch);
assertTrue(aManager.contains(aNewLaunch));
assertTrue(aManager.find(Launch.class, aNewLaunch.getRdfId()).getLaunchSite().getRdfId().equals(aNewSiteTwo.getRdfId()));
assertFalse(aManager.contains(aNewSiteTwo));
aManager.merge(aNewLaunchWithProxy);
assertTrue(aManager.contains(aNewLaunchWithProxy));