}
private void assertRootUriFor(String baseUri, String expectedUri) {
MongoPersistentEntity<?> entity = context.getPersistentEntity(Profile.class);
ResourceMetadata metadata = new MappingResourceMetadata(entity);
RepositoryLinkBuilder builder = new RepositoryLinkBuilder(metadata, new BaseUri(baseUri));
Link link = builder.withSelfRel();
assertThat(link.getHref(), is(expectedUri));