### Question:
DefaultNewResourceHandler implements NewResourceHandler { @Override public Command getCommand(final NewResourcePresenter newResourcePresenter) { return new Command() { @Override public void execute() { newResourcePresenter.show(DefaultNewResourceHandler.this); } }; } DefaultNewResourceHandler(final WorkspaceProjectContext context,
                              final Caller<KieModuleService> moduleService,
                              final Caller<ValidationService> validationService,
                              final PlaceManager placeManager,
                              final Event<NotificationEvent> notificationEvent,
                              final BusyIndicatorView busyIndicatorView);  DefaultNewResourceHandler(); @Override List<Pair<String, ? extends IsWidget>> getExtensions(); @Override void validate(final String baseFileName,
                         final ValidatorWithReasonCallback callback); @Override void acceptContext(final Callback<Boolean, Void> callback); @Override Command getCommand(final NewResourcePresenter newResourcePresenter); @Override boolean canCreate();  }### Answer:
@Test public void testGetCommand() { final NewResourcePresenter presenter = mock(NewResourcePresenter.class); final Command command = handler.getCommand(presenter); assertNotNull(command); command.execute(); verify(presenter, times(1)).show(handler); }