### Question:
AbstractCrudChildRestResource extends AbstractBaseCrudRestResource<Read, Write> { protected UriComponentsBuilder buildBaseUriBuilder(ID parentId) { UriComponentsBuilder builder = createUriComponentsBuilder(getBaseParentApiUrl()); builder.path(String.valueOf(parentId)); builder.path(ensureStartsAndEndsWithSlash(getChildPath())); return builder; }  PageableResult<Read> find(ID parentId, int page, int pagesize); PageableResult<Read> find(ID parentId, Pageable pageable); Optional<Read> getById(ID parentId, ID id); Read create(ID parentId, Write write); Read update(ID parentId, ID id, Write write); void delete(ID parentId, ID id);  }### Answer:
@Test public void buildBaseUriBuilderWithoutSlash() { TestWithoutSlashCrudChildRestResource resoure = new TestWithoutSlashCrudChildRestResource(); UriComponentsBuilder builder = resoure.buildBaseUriBuilder("123"); assertThat(builder, notNullValue()); assertThat(builder.toUriString(), equalTo(TestWithoutSlashCrudChildRestResource.BASE_PARENT_API_URL + "/123/child/")); }
@Test public void buildBaseUriBuilderWithSlash() { TestWithSlashCrudChildRestResource resoure = new TestWithSlashCrudChildRestResource(); UriComponentsBuilder builder = resoure.buildBaseUriBuilder("123"); assertThat(builder, notNullValue()); assertThat(builder.toUriString(), equalTo("https: }