### Question:
Main extends AbstractObservable { public void newDomain() { d_domainMgr.resetDomain(); setCurFilename(null); setDisplayName(DISPLAY_NEW); setDataChanged(false); } Main(String[] args, boolean headless); static void bindPrintScreen(Container container); void loadExampleDomain(String exampleFile); Domain getDomain(); void newDomain(); int fileLoadActions(); boolean loadDomainFromFile(String path); void saveDomainToFile(String path); static void main(final String[] args); void leftTreeFocus(Object node); void setCurFilename(String curFilename); String getCurFilename(); void setDataChanged(boolean dataChanged); boolean isDataChanged(); void showMainWindow(); static AddisWindow getMainWindow(); DomainChangedModel getDomainChangedModel(); String getDisplayName(); DomainManager getDomainManager(); static final ImageLoader IMAGELOADER; static final String PROPERTY_DISPLAY_NAME; }### Answer:
@Test public void testNewDomain() { Main main = new Main(new String[] {}, true); PropertyChangeListener listener = JUnitUtil.mockStrictListener(main, Main.PROPERTY_DISPLAY_NAME, null, Main.DISPLAY_NEW); main.addPropertyChangeListener(listener); main.newDomain(); EasyMock.verify(listener); assertEquals(Main.DISPLAY_NEW, main.getDisplayName()); assertEquals(null, main.getCurFilename()); assertNotNull(main.getDomain()); assertFalse(main.getDomainChangedModel().getValue()); }