inventory.create(aSampleMo().withType("typeA").withName("A1").build());
inventory.create(aSampleMo().withType("typeA").withName("A2").build());
inventory.create(aSampleMo().withType("typeB").withName("B").build());
// When
InventoryFilter filterA = new InventoryFilter().byType("typeA");
ManagedObjectCollectionRepresentation typeAMos = (ManagedObjectCollectionRepresentation) inventory.getManagedObjectsByFilter(filterA).get();
// Then
assertThat(typeAMos.getManagedObjects().size()).isEqualTo(2);
// When
InventoryFilter filterB = new InventoryFilter().byType("typeB");
ManagedObjectCollectionRepresentation typeBMos = (ManagedObjectCollectionRepresentation) inventory.getManagedObjectsByFilter(filterB).get();
// Then
assertThat(typeBMos.getManagedObjects().size()).isEqualTo(1);
}