Map<String, ExpandSelectTreeNode> links = new HashMap<String, ExpandSelectTreeNode>();
links.put("nb_Rooms", node2);
ExpandSelectTreeNode node1 = Mockito.mock(ExpandSelectTreeNode.class);
Mockito.when(node1.getLinks()).thenReturn(links);
final ODataResponse response = new JsonEntityProvider().writeEntry(entitySet, buildingData,
EntityProviderWriteProperties.serviceRoot(URI.create(BASE_URI)).expandSelectTree(node1).build());
final String json = verifyResponse(response);
assertEquals("{\"d\":{\"__metadata\":{\"id\":\"" + BASE_URI + "Buildings('1')\","
+ "\"uri\":\"" + BASE_URI + "Buildings('1')\",\"type\":\"RefScenario.Building\"},"
+ "\"nb_Rooms\":{\"__deferred\":{\"uri\":\"" + BASE_URI + "Buildings('1')/nb_Rooms\"}}}}",