### Question:
Hook { boolean isValid() { try { new URL(this.uri); } catch (MalformedURLException ex) { return false; } return this.command != null; } Hook(String uri, FtpEventName command);  Hook(); long getId(); String getUri(); FtpEventName getCommand(); void setCommand(FtpEventName command); static final String findByCommand; }### Answer:
@Test public void validUri() { Hook cut = new Hook("http: assertTrue(cut.isValid()); }
@Test public void invalidUri() { Hook cut = new Hook("asdf", FtpEventName.EVERYTHING); assertFalse(cut.isValid()); }