@SuppressWarnings("unchecked")
public void testDatacenterToLocation() {
ApiContext<AbiquoApi> context = EasyMock.createMock(ApiContext.class);
DatacenterToLocation function = new DatacenterToLocation();
Datacenter datacenter = Datacenter.builder(context).name("dc").location("New York").build();
datacenter.unwrap().setId(5);
Location location = function.apply(datacenter);
assertEquals(location.getId(), "5");
assertEquals(location.getScope(), LocationScope.REGION);
}