### Question:
ScreenCreator { @Nonnull public Screen create(@Nonnull final Nifty nifty) { Screen screen = createScreen(nifty); addRootElement(nifty, screen); addDefaultFocusElement(screen); addInputMapping(screen, inputMapping); addPreInputMapping(screen, inputMappingPre); nifty.addScreen(id, screen); return screen; } ScreenCreator(@Nonnull final String id);  ScreenCreator(@Nonnull final String id, @Nullable final ScreenController screenController); void setScreenController(@Nullable final ScreenController screenController); void setDefaultFocusElement(@Nullable final String defaultFocusElement); void setInputMapping(@Nullable final String inputMapping); void setInputMappingPre(@Nullable final String inputMappingPre); @Nonnull Screen create(@Nonnull final Nifty nifty);  }### Answer:
@Test public void constructWithId() { ScreenCreator createWithId = new ScreenCreator("myid"); Screen screen = createWithId.create(niftyMock); assertEquals("myid", screen.getScreenId()); }
@Test public void constructWithIdAndScreenController() { ScreenController screenController = new MyScreenController(); ScreenCreator createWithIdAndScreenController = new ScreenCreator("myid", screenController); Screen screen = createWithIdAndScreenController.create(niftyMock); assertEquals("myid", screen.getScreenId()); assertEquals(screenController, screen.getScreenController()); }
@Test public void testRootElement() { ScreenCreator createWithId = new ScreenCreator("myid"); Screen screen = createWithId.create(niftyMock); assertEquals(rootElement, screen.getRootElement()); }
@Test public void testDefaultFocusElementWithDefaultValue() { ScreenCreator createWithId = new ScreenCreator("myid"); Screen screen = createWithId.create(niftyMock); assertNull(screen.getDefaultFocusElementId()); }