### Question:
Screen { @Nonnull StartScreenEndNotify createScreenStartEndNotify(final EndNotify startScreenEndNotify) { return new StartScreenEndNotify(startScreenEndNotify); } Screen(
      @Nonnull final Nifty newNifty,
      @Nonnull final String newId,
      @Nonnull final ScreenController newScreenController,
      @Nonnull final TimeProvider newTimeProvider); void registerElementId(@Nonnull final String id); void unregisterElementId(@Nonnull final String id); @Nonnull String getScreenId(); @Nonnull List<Element> getLayerElements(); void addLayerElement(@Nonnull final Element layerElement); void removeLayerElement(@Nonnull final Element layerElement); void removeLayerElement(@Nonnull final String layerId); void addPopup(@Nonnull final Element popup, @Nullable final Element defaultFocusElement); void closePopup(@Nonnull final Element popup, final EndNotify closeNotify); void startScreen(); void startScreen(final EndNotify startScreenEndNotify); void endScreen(final EndNotify callback); void layoutLayers(); void setDefaultFocus(); final void renderLayers(@Nonnull final NiftyRenderEngine renderDevice); void resetLayout(); boolean mouseEvent(@Nonnull final NiftyMouseInputEvent inputEvent); @Nullable @Deprecated Element findElementByName(final String name); @Nullable Element findElementById(@Nullable final String findId); @Nullable T findControl(final String elementName, @Nonnull final Class<T> requestedControlClass); @Nullable T findNiftyControl(
      @Nullable final String elementName,
      @Nonnull final Class<T> requestedControlClass); void setAlternateKey(@Nullable final String alternateKey); boolean keyEvent(@Nonnull final KeyboardInputEvent inputEvent); void addKeyboardInputHandler(
      @Nonnull final NiftyInputMapping mapping,
      @Nonnull final KeyInputHandler handler); void removeKeyboardInputHandler(final KeyInputHandler handler); void addPreKeyboardInputHandler(
      @Nonnull final NiftyInputMapping mapping,
      @Nonnull final KeyInputHandler handler); void removePreKeyboardInputHandler(final KeyInputHandler handler); @Nonnull String debugOutput(); @Nonnull String debugOutputFocusElements(); @Nonnull String debugOutput(@Nonnull final String regexpElement, @Nonnull final String regexpAttribute); @Nonnull String outputElement(
      @Nonnull final Element w,
      @Nonnull final String offset,
      @Nonnull final String regexpElement,
      @Nonnull final String regexpAttribute); @Nonnull ScreenController getScreenController(); @Nonnull FocusHandler getFocusHandler(); @Nonnull Element getRootElement(); @SuppressWarnings("NullableProblems") void setRootElement(@Nonnull final Element rootElementParam); void processAddAndRemoveLayerElements(); boolean hasDynamicElements(); void setDefaultFocusElement(@Nullable final String defaultFocusElementIdParam); @Nullable String getDefaultFocusElementId(); boolean isRunning(); boolean isEffectActive(@Nonnull final EffectEventId effectEventId); @Nullable Element getTopMostPopup(); boolean isActivePopup(@Nonnull final String id); boolean isActivePopup(final Element element); boolean isMouseOverElement(); @Nonnull String getMouseOverInfoString(); boolean isBound(); void resetMouseDown(); public int layoutLayersCallCount; }### Answer:
@Test public void testStartScreenEndNotifyWithAdditionalEndNotify() { EndNotify endNotifyMock = createMock(EndNotify.class); endNotifyMock.perform(); replay(endNotifyMock); startScreenEndNotify = screen.createScreenStartEndNotify(endNotifyMock); startScreenEndNotify.perform(); verify(endNotifyMock); }
@Test public void testStartScreenEndNotifyWithoutAdditionalEndNotify() { startScreenEndNotify = screen.createScreenStartEndNotify(null); startScreenEndNotify.perform(); }