@Nullable
	ContainerPrices calculate(@Nullable Item[] items)
	{
		if (items == null)
		{
			return null;
		}

		long ge = 0;
		long alch = 0;

		for (final Item item : items)
		{
			final int qty = item.getQuantity();
			final int id = item.getId();

			if (id <= 0 || qty == 0)
			{
				continue;
			}

			alch += (long) getHaPrice(id) * qty;
			ge += (long) itemManager.getItemPrice(id) * qty;
		}

		return new ContainerPrices(ge, alch);
	}
@Test
	public void testCalculate()
	{
		Item coins = new Item(ItemID.COINS_995, Integer.MAX_VALUE);

		Item whip = new Item(ItemID.ABYSSAL_WHIP, 1_000_000_000);

		Item[] items = ImmutableList.of(
			coins,
			whip
		).toArray(new Item[0]);

		ItemComposition whipComp = mock(ItemComposition.class);
		when(whipComp.getHaPrice())
			.thenReturn(4); // 4 * 1m overflows
		when(itemManager.getItemComposition(ItemID.ABYSSAL_WHIP))
			.thenReturn(whipComp);
		when(itemManager.getItemPrice(ItemID.ABYSSAL_WHIP))
			.thenReturn(3); // 1b * 3 overflows

		final ContainerPrices prices = bankPlugin.calculate(items);
		assertNotNull(prices);

		assertTrue(prices.getHighAlchPrice() > Integer.MAX_VALUE);
		assertTrue(prices.getGePrice() > Integer.MAX_VALUE);
	}