EntityServiceImpl implements EntityService { @Override public void deleteEntity(Key entityKey) { datastoreHelper.delete(entityKey, entityKey.getNamespace()); } @Inject  EntityServiceImpl(
            DatastoreHelper datastoreHelper); @Override Entity getEntity(String encodedKey); @Override Entity updateEntity(Entity entity); @Override void deleteEntity(Key entityKey);  }
@Test(expected = EntityNotFoundException.class) public void deleteEntity_entityStored_shouldDeleteEntity() throws EntityNotFoundException { Entity sentEntity = createEntityInDatastore(KIND_NAME, PROPERTY_NAME, A_NAME); Key entityKey = sentEntity.getKey(); Long entityId = entityKey.getId(); entityService.deleteEntity(entityKey); getEntityFromEntityResource(entityId); }