static RecommendedItemsWritable recommendationsMatch(final RecommendedItem... items) {
EasyMock.reportMatcher(new IArgumentMatcher() {
@Override
public boolean matches(Object argument) {
if (argument instanceof RecommendedItemsWritable) {
RecommendedItemsWritable recommendedItemsWritable = ((RecommendedItemsWritable) argument);
List<RecommendedItem> expectedItems = new LinkedList<RecommendedItem>(Arrays.asList(items));
return expectedItems.equals(recommendedItemsWritable.getRecommendedItems());
}
return false;
}
@Override