@Test public void should_create_inventory() { assertNotNull(Inventory.create("12345", "name")); }
public static Inventory create(String productId, String productName) { return Inventory.builder() .id(newUuid()) .productId(productId) .productName(productName) .remains(0) .createdAt(Instant.now()) .build(); }
Inventory extends BaseAggregate { public static Inventory create(String productId, String productName) { return Inventory.builder() .id(newUuid()) .productId(productId) .productName(productName) .remains(0) .createdAt(Instant.now()) .build(); } }
Inventory extends BaseAggregate { public static Inventory create(String productId, String productName) { return Inventory.builder() .id(newUuid()) .productId(productId) .productName(productName) .remains(0) .createdAt(Instant.now()) .build(); }  }
Inventory extends BaseAggregate { public static Inventory create(String productId, String productName) { return Inventory.builder() .id(newUuid()) .productId(productId) .productName(productName) .remains(0) .createdAt(Instant.now()) .build(); }  static Inventory create(String productId, String productName); void decrease(int number); void increase(int number); void updateProductName(String newName); InventoryRepresentation toRepresentation(); }
Inventory extends BaseAggregate { public static Inventory create(String productId, String productName) { return Inventory.builder() .id(newUuid()) .productId(productId) .productName(productName) .remains(0) .createdAt(Instant.now()) .build(); }  static Inventory create(String productId, String productName); void decrease(int number); void increase(int number); void updateProductName(String newName); InventoryRepresentation toRepresentation();  }