throws XmlException, ServiceCallException, IOException, HttpErrorException
{
GetItemType getItem = GetItemHelper.getGetItemsRequest(requestedList);
GetItemResponseType getItemResponse = mock(GetItemResponseType.class);
ArrayOfResponseMessagesType arrayOfResponseMessages = mock(ArrayOfResponseMessagesType.class);
ItemInfoResponseMessageType itemInfoResponseMessage = mock(ItemInfoResponseMessageType.class);
ArrayOfRealItemsType arrayOfRealItems = mock(ArrayOfRealItemsType.class);
LOG.debug("Expecting get item request for User:{}; Data:{}", user, getItem);
when(service.getItem(likeThis(getItem), eq(user))).thenReturn(getItemResponse);
when(getItemResponse.getResponseMessages()).thenReturn(arrayOfResponseMessages);
when(arrayOfResponseMessages.getGetItemResponseMessageArray())
.thenReturn(new ItemInfoResponseMessageType[]{itemInfoResponseMessage});
when(itemInfoResponseMessage.getItems()).thenReturn(arrayOfRealItems);
when(arrayOfRealItems.getMessageArray()).thenReturn(messages);
}