@Test
public void buildDerivedEntity() {

  EdmEntitySet entitySet = Mockito.mock(EdmEntitySet.class);
  Mockito.when(entitySet.getName()).thenReturn("Customers");
  EdmEntityType derivedType = Mockito.mock(EdmEntityType.class);
  Mockito.when(derivedType.getFullQualifiedName()).thenReturn(new FullQualifiedName("Model", "VipCustomer"));
  final ContextURL contextURL = ContextURL.with().serviceRoot(serviceRoot)
      .entitySet(entitySet)
      .derived(derivedType)
      .suffix(Suffix.ENTITY)
      .build();
  assertEquals(serviceRoot + "$metadata#Customers/Model.VipCustomer/$entity",
      ContextURLBuilder.create(contextURL).toASCIIString());
}