assertFalse(savedSprints.isEmpty());
assertEquals(1, savedSprints.size());
}
public void testRemove() {
Sprint sprint1 = new Sprint(
new TenantId("12345"), new ProductId("p00000"), new SprintId("s11111"),
"sprint1", "My sprint 1.", new Date(), new Date());
Sprint sprint2 = new Sprint(
new TenantId("12345"), new ProductId("p00000"), new SprintId("s11112"),
"sprint2", "My sprint 2.", new Date(), new Date());
LevelDBUnitOfWork.start(this.database);
sprintRepository.save(sprint1);
sprintRepository.save(sprint2);
LevelDBUnitOfWork.current().commit();
LevelDBUnitOfWork.start(this.database);
sprintRepository.remove(sprint1);
LevelDBUnitOfWork.current().commit();
TenantId tenantId = sprint2.tenantId();
ProductId productId = sprint2.productId();
Collection<Sprint> savedSprints = sprintRepository.allProductSprints(tenantId, productId);
assertFalse(savedSprints.isEmpty());
assertEquals(1, savedSprints.size());
assertEquals(sprint2.name(), savedSprints.iterator().next().name());
LevelDBUnitOfWork.start(this.database);
sprintRepository.remove(sprint2);
LevelDBUnitOfWork.current().commit();