assertTrue("GameSynchronization.aj should start with one imports", cUnit.getImports().length == 1);
assertTrue("GameSynchronization.aj should start with one import", cUnit.getImports().length == 1);
	public void testOrganiseImports2() throws Exception {		IProject project = Utils.createPredefinedProject("Spacewar Example");		try {			IFile gameSynchronizationFile = (IFile)project.findMember("src/spacewar/GameSynchronization.aj");			assertTrue("The Spacewar Example project should contain a file called 'GameSynchronization.aj'", gameSynchronizationFile != null );			Utils.openFileInDefaultEditor(gameSynchronizationFile, true);			final ICompilationUnit cUnit = AJCompilationUnitManager.INSTANCE.getAJCompilationUnit(gameSynchronizationFile);			assertTrue("GameSynchronization.aj should start with one imports", cUnit.getImports().length == 1);			Utils.waitForJobsToComplete();						//			 Post Ctrl+Shift+O to organise imports			postKeyDown(SWT.CTRL);			postKeyDown(SWT.SHIFT);			postCharacterKey('o');			postKeyUp(SWT.SHIFT);			postKeyUp(SWT.CTRL);//			 Wait for an error condition to make sure it's caught if it does occur			new DisplayHelper() {				protected boolean condition() {					try {						return  cUnit.getImports().length == 0;					} catch (JavaModelException e) {					}					return false;				}						}.waitForCondition(display, 3000);			assertTrue("BoundPoint.aj should now have one imports, has " + cUnit.getImports().length, cUnit.getImports().length == 1);						// Post Ctrl+S to save the file			postKeyDown(SWT.CTRL);			postCharacterKey('s');			postKeyUp(SWT.CTRL);			// Wait for an error condition to make sure it's caught if it does occur			new DisplayHelper() {				protected boolean condition() {					try {											IMarker[] problemMarkers = cUnit.getResource().findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ONE);						return problemMarkers.length == 1;					} catch (CoreException e) {					}					return false;				}						}.waitForCondition(display, 3000);			IMarker[] problemMarkers = cUnit.getResource().findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_ONE);			assertTrue("BoundPoint.aj should not have any problems", problemMarkers.length == 0);		} finally {			Utils.waitForJobsToComplete();			Utils.deleteProject(project);		}	}