*/
@Test
public void testChangeGhostControllerAfterUI() throws FactoryException {
assumeTrue(MainUI.class.desiredAssertionStatus());
mainUI.initialize();
mainUI.withGhostController(new RandomGhostMover(mainUI.getGame()));
mainUI.createUI();
boolean gotException = false;
//After creating the UI, the GhostController should not be allowed to be changed.
//This should cause an assertion error.
try {
mainUI.withGhostController(new RandomGhostMover(mainUI.getGame()));
}
catch (AssertionError ae) {
gotException = true;
}
assertTrue(gotException);