NewSSHKeyModal implements NewSSHKeyModalView.Presenter { public void init(NewSSHKeyModalHandler handler) { PortablePreconditions.checkNotNull("handler", handler); this.handler = handler; } @Inject  NewSSHKeyModal(final NewSSHKeyModalView view, final Caller<SSHKeyEditorService> serviceCaller, final TranslationService translationService); void init(NewSSHKeyModalHandler handler); void show(); @Override void notifyCancel(); @Override void notifyAdd(String name, String key); void hide();  }
@Test public void testInitNull() { Assertions.assertThatThrownBy(() -> modal.init(null)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Parameter named 'handler' should be not null!"); }