Bug 65240 Hierarchical layout: Problems with inclusion filters [package explorer]
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/packageview/ContentProviderTests1.java
public void testGetParentMidLevelFragment() throws Exception{
		Object expectedParent= fPack3;
		Object parent= fProvider.getParent(fPack4);
		assertTrue("Wrong parent found for a NON top level PackageFragment", expectedParent.equals(parent));
	}
	
	
	public void testDeleteBottomLevelFragment() throws Exception{
		
		
		IElementChangedListener listener= (IElementChangedListener)fProvider;
		IJavaElementDelta delta= TestDelta.createDelta(fPack4, IJavaElementDelta.REMOVED);
		listener.elementChanged(new ElementChangedEvent(delta, ElementChangedEvent.POST_CHANGE));
		
		
		while(fMyPart.getTreeViewer().getControl().getDisplay().readAndDispatch()) {}
		
		assertTrue("Remove happened", fMyPart.hasRemoveHappened());
		assertTrue("Correct Remove", fMyPart.getRemovedObject().contains(fPack4));
		assertEquals("No refreshes", 0, fMyPart.getRefreshedObject().size());
	}
	
	public void testAddBottomLevelFragment() throws Exception {
		IPackageFragment test= fRoot1.createPackageFragment("test", true, null);
		
		IElementChangedListener listener= (IElementChangedListener) fProvider;
		IJavaElementDelta delta= TestDelta.createDelta(test, IJavaElementDelta.ADDED);
		listener.elementChanged(new ElementChangedEvent(delta, ElementChangedEvent.POST_CHANGE));
		
		while(fMyPart.getTreeViewer().getControl().getDisplay().readAndDispatch()) {}