### Question:
ItemsContainer extends GameObject implements InventoryHolder { @Override public boolean placeItem(Item item) { if (items.size() < containerCapacity) { items.add(item); return true; } else { return false; } } ItemsContainer(int containerCapacity);  ItemsContainer(Document document); @Override char getMapInfo(); @Override boolean placeItem(Item item); @Override void takeItem(int itemId); @Override boolean canTakeItem(int itemId); @Override JSONObject jsonSerialise(); @Override Document mongoSerialise();  }### Answer:
@Test public void shouldPlaceItemWhenCapacityAllowsIt() { ItemsContainer itemsContainer = new ItemsContainer(1); boolean result = itemsContainer.placeItem(new ItemCopper()); Assert.assertEquals(true, result); }
@Test public void shouldNotPlaceItemWhenThereIsNoCapacityLeft() { ItemsContainer itemsContainer = new ItemsContainer(1); itemsContainer.placeItem(new ItemCopper()); boolean result = itemsContainer.placeItem(new ItemCopper()); Assert.assertEquals(false, result); }