### Question:
Browser extends Collapsible { String skipLastSlash(String uri) { if (!uri.endsWith("/")) { return uri; } return uri.substring(0, uri.lastIndexOf("/")); } Browser(); Node view(); StringProperty getURI(); @Override DoubleProperty getMaxHeightProperty();  }### Answer:
@Test public void skipLastSlashWithExistingSlash(){ String expected = "hey"; String origin = "hey/"; String actual = this.cut.skipLastSlash(origin); assertThat(actual,is(expected)); }
@Test public void skipLastSlashWithoutExistingSlash(){ String expected = "hey"; String origin = "hey"; String actual = this.cut.skipLastSlash(origin); assertThat(actual,is(expected)); }