source: class ContextURLBuilderTest {
  
    private static final URI serviceRoot;
  
    @Test
    public void buildPrimitiveType() {
  
target:     ContextURL contextURL = ContextURL.with().serviceRoot(serviceRoot)
          .type(OData.newInstance().createPrimitiveTypeInstance(EdmPrimitiveTypeKind.String))
          .build();
      assertEquals(serviceRoot + "$metadata#Edm.String",
          ContextURLBuilder.create(contextURL).toASCIIString());
  
      contextURL = ContextURL.with().serviceRoot(serviceRoot)
          .type(OData.newInstance().createPrimitiveTypeInstance(EdmPrimitiveTypeKind.String)).asCollection()
          .build();
      assertEquals(serviceRoot + "$metadata#Collection(Edm.String)",
          ContextURLBuilder.create(contextURL).toString());
    }
  
  }