@Test
public void updateEntity_entityStored_shouldUpdateEntity() throws EntityNotFoundException {

    // given
    Entity sentEntity = createEntityInDatastore(KIND_NAME, PROPERTY_NAME, A_NAME);
    Long entityId = sentEntity.getKey().getId();
    // when
    sentEntity.setProperty(PROPERTY_NAME, ANOTHER_NAME);
    entityService.updateEntity(sentEntity);
    // then
    Entity savedEntity = getEntityFromEntityResource(entityId);
    assertEquals(ANOTHER_NAME, savedEntity.getProperty(PROPERTY_NAME));
}