}
public void testSaveWithTypes() throws Exception {
BacklogItem backlogItem1 =
new BacklogItem(
new TenantId("12345"),
new ProductId("67890"),
new BacklogItemId("bli1"),
"My backlog item 1.",
"Domain Model",
BacklogItemType.FEATURE,
BacklogItemStatus.PLANNED,
StoryPoints.EIGHT);
LevelDBUnitOfWork.start(this.database);
backlogItemRepository.save(backlogItem1);
LevelDBUnitOfWork.current().commit();
BacklogItem savedBacklogItem =
backlogItemRepository
.backlogItemOfId(
backlogItem1.tenantId(),
backlogItem1.backlogItemId());
assertNotNull(savedBacklogItem);
assertEquals(backlogItem1.tenantId(), savedBacklogItem.tenantId());
assertEquals(backlogItem1.productId(), savedBacklogItem.productId());
assertEquals(backlogItem1.summary(), savedBacklogItem.summary());
assertEquals(backlogItem1.category(), savedBacklogItem.category());
assertEquals(backlogItem1.type(), savedBacklogItem.type());
assertEquals(backlogItem1.storyPoints(), savedBacklogItem.storyPoints());
Collection<BacklogItem> savedBacklogItems =
backlogItemRepository
.allProductBacklogItems(backlogItem1.tenantId(), backlogItem1.productId());
assertFalse(savedBacklogItems.isEmpty());
assertEquals(1, savedBacklogItems.size());
BacklogItem backlogItem2 =
new BacklogItem(
new TenantId("12345"),
new ProductId("67890"),
new BacklogItemId("bli2"),
"My backlog item 1.",
"Domain Model",
BacklogItemType.FEATURE,