@Test
public void buildWithCharactersToBeEscaped() {

  EdmEntitySet entitySet = Mockito.mock(EdmEntitySet.class);
  Mockito.when(entitySet.getName()).thenReturn("Entitäten");
  EdmEntityType derivedType = Mockito.mock(EdmEntityType.class);
  Mockito.when(derivedType.getFullQualifiedName()).thenReturn(
      new FullQualifiedName("Namensräumchen", "UnüblicherName"));
  final ContextURL contextURL = ContextURL.with().entitySet(entitySet).derived(derivedType).build();
  assertEquals("$metadata#Entit%C3%A4ten/Namensr%C3%A4umchen.Un%C3%BCblicherName",
      ContextURLBuilder.create(contextURL).toString());
}