### Question:
ExaminePlugin extends Plugin { @VisibleForTesting void getItemPrice(int id, ItemDefinition itemComposition, int quantity) { quantity = Math.max(1, quantity); final int gePrice = itemManager.getItemPrice(id); final int alchPrice = itemComposition.getHaPrice(); if (gePrice > 0 || alchPrice > 0) { final ChatMessageBuilder message = new ChatMessageBuilder() .append(ChatColorType.NORMAL) .append("Price of ") .append(ChatColorType.HIGHLIGHT); if (quantity > 1) { message .append(QuantityFormatter.formatNumber(quantity)) .append(" x "); } message .append(itemComposition.getName()) .append(ChatColorType.NORMAL) .append(":"); if (gePrice > 0) { int finalQuantity = quantity; message .append(ChatColorType.NORMAL) .append(" GE ") .append(ChatColorType.HIGHLIGHT) .append(QuantityFormatter.formatNumber((long) gePrice * finalQuantity)); if (finalQuantity > 1) { message .append(ChatColorType.NORMAL) .append(" (") .append(ChatColorType.HIGHLIGHT) .append(QuantityFormatter.formatNumber(gePrice)) .append(ChatColorType.NORMAL) .append("ea)"); } message .append(ChatColorType.NORMAL) .append(" HA value ") .append(ChatColorType.HIGHLIGHT) .append(QuantityFormatter.formatNumber((long) alchPrice * finalQuantity)); if (finalQuantity > 1) { message .append(ChatColorType.NORMAL) .append(" (") .append(ChatColorType.HIGHLIGHT) .append(QuantityFormatter.formatNumber(alchPrice)) .append(ChatColorType.NORMAL) .append("ea)"); } chatMessageManager.queue(QueuedMessage.builder() .type(ChatMessageType.ITEM_EXAMINE) .runeLiteFormattedMessage(message.build()) .build()); } else { message .append(ChatColorType.NORMAL) .append(" HA value ") .append(ChatColorType.HIGHLIGHT) .append(QuantityFormatter.formatNumber(alchPrice * quantity)); if (quantity > 1) { message .append(ChatColorType.NORMAL) .append(" (") .append(ChatColorType.HIGHLIGHT) .append(QuantityFormatter.formatNumber(alchPrice)) .append(ChatColorType.NORMAL) .append("ea)"); } chatMessageManager.queue(QueuedMessage.builder() .type(ChatMessageType.ITEM_EXAMINE) .runeLiteFormattedMessage(message.build()) .build()); } } }    }### Answer:
@Test public void testGetItemPrice() { ItemDefinition itemDefinition = mock(ItemDefinition.class); when(itemDefinition.getName()).thenReturn("Abyssal whip"); when(itemDefinition.getHaPrice()).thenReturn(2); when(itemManager.getItemPrice(ItemID.ABYSSAL_WHIP)).thenReturn(3); examinePlugin.getItemPrice(ItemID.ABYSSAL_WHIP, itemDefinition, 2_000_000_000); ArgumentCaptor<QueuedMessage> argumentCaptor = ArgumentCaptor.forClass(QueuedMessage.class); verify(chatMessageManager).queue(argumentCaptor.capture()); QueuedMessage queuedMessage = argumentCaptor.getValue(); assertEquals( "<colNORMAL>Price of <colHIGHLIGHT>2,000,000,000 x Abyssal whip<colNORMAL>:<colNORMAL> GE <colHIGHLIGHT>6,000,000,000<colNORMAL> (<colHIGHLIGHT>3<colNORMAL>ea)<colNORMAL> HA value <colHIGHLIGHT>4,000,000,000<colNORMAL> (<colHIGHLIGHT>2<colNORMAL>ea)", queuedMessage.getRuneLiteFormattedMessage() ); }