final String contentType = ContentType.APPLICATION_JSON.toContentTypeString();
final EdmEntitySet entitySet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Rooms");
InputStream content = getFileAsStream("JsonWithDeletedEntries.json");
EntityProviderReadProperties properties = EntityProviderReadProperties.init().build();
ODataDeltaFeed deltaFeed = new ProviderFacadeImpl().readDeltaFeed(contentType, entitySet, content, properties);
assertNotNull(deltaFeed);
assertNotNull(deltaFeed.getEntries());
assertNotNull(deltaFeed.getFeedMetadata());
assertEquals(1, deltaFeed.getEntries().size());
assertEquals("http://localhost:8080/ReferenceScenario.svc/Rooms?!deltatoken=4711",
deltaFeed.getFeedMetadata().getDeltaLink());
assertEquals(2, deltaFeed.getDeletedEntries().size());
List<DeletedEntryMetadata> deletedEntries = deltaFeed.getDeletedEntries();
assertEquals(2, deletedEntries.size());
for (DeletedEntryMetadata deletedEntry : deletedEntries) {
String uri = deletedEntry.getUri();
if (uri.contains("Rooms('4')")) {
assertEquals("http://host:80/service/Rooms('4')", deletedEntry.getUri());