@Test
public void should_create_error_message_with_custom_comparison_strategy() {
ErrorMessageFactory factory = shouldContainOnly(newArrayList("Yoda", "Han"), newArrayList("Luke", "Yoda"), newLinkedHashSet("Luke"), newLinkedHashSet("Han"),
new ComparatorBasedComparisonStrategy(CaseInsensitiveStringComparator.instance));
String message = factory.create(new TextDescription("Test"), new StandardRepresentation());
assertEquals("[Test] \nExpecting:\n <[\"Yoda\", \"Han\"]>\nto contain only:\n <[\"Luke\", \"Yoda\"]>\n"
+ "elements not found:\n <[\"Luke\"]>\nand elements not expected:\n <[\"Han\"]>\n"
+ "when comparing values using 'CaseInsensitiveStringComparator'", message);
}