### Question:
ReceiveCommodityViewModel extends BaseCommodityViewModel { public int getDifference() { return quantityReceived - quantityAllocated; } ReceiveCommodityViewModel(Commodity commodity);  ReceiveCommodityViewModel(Commodity commodity, int quantityAllocated, int quantityReceived);  ReceiveCommodityViewModel(AllocationItem item); int getDose(); int getDifference(); ReceiveItem getReceiveItem(); boolean isQuantityAllocatedDisabled(); int getQuantityAllocated(); int getQuantityReceived(); void setQuantityAllocated(int quantityAllocated); void setQuantityReceived(int quantityReceived);  }### Answer:
@Test public void shouldReturnTheDifferenceQuantity() { ReceiveCommodityViewModel viewModel = new ReceiveCommodityViewModel(new Commodity("Panadol"), QUANTITY_ALLOCATED, QUANTITY_RECEIVED); assertThat(viewModel.getDifference(), is(-1)); }