SSHKeyEditor implements IsElement,
                                     SSHKeyEditorView.Presenter { public void render(PortableSSHPublicKey key, Command onDelete) { PortablePreconditions.checkNotNull("key", key); PortablePreconditions.checkNotNull("onDelete", onDelete); this.key = key; this.onDelete = onDelete; view.clear(); view.render(key); } @Inject  SSHKeyEditor(SSHKeyEditorView view); void render(PortableSSHPublicKey key, Command onDelete); @Override HTMLElement getElement(); @Override void notifyDelete(); @PreDestroy void clear();  }
@Test public void testInitFailures() { Assertions.assertThatThrownBy(() -> editor.render(null, onDelete)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Parameter named 'key' should be not null!"); Assertions.assertThatThrownBy(() -> editor.render(key, null)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Parameter named 'onDelete' should be not null!"); }