assertFalse(savedTeams.isEmpty());
assertEquals(1, savedTeams.size());
}
public void testRemove() {
Team team1 = new Team(new TenantId("12345"), "team1");
Team team2 = new Team(new TenantId("12345"), "team2");
LevelDBUnitOfWork.start(this.database);
teamRepository.save(team1);
teamRepository.save(team2);
LevelDBUnitOfWork.current().commit();
LevelDBUnitOfWork.start(this.database);
teamRepository.remove(team1);
LevelDBUnitOfWork.current().commit();
TenantId tenantId = team2.tenantId();
Collection<Team> savedTeams = teamRepository.allTeamsOfTenant(tenantId);
assertFalse(savedTeams.isEmpty());
assertEquals(1, savedTeams.size());
assertEquals(team2.name(), savedTeams.iterator().next().name());
LevelDBUnitOfWork.start(this.database);
teamRepository.remove(team2);
LevelDBUnitOfWork.current().commit();