MediaType mt1 = new MediaType("*", "*");
MediaType mt2 = new MediaType("text", "xml");
List<Variant> variants = vb.mediaTypes(mt1, mt2)
.languages(new Locale("en"), new Locale("fr")).encodings("zip", "identity").add().build();
assertEquals("8 variants need to be created", 8, variants.size());
assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("en"), "zip")));
assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("en"), "identity")));
assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("fr"), "zip")));
assertTrue(verifyVariant(variants, new Variant(mt1, new Locale("fr"), "identity")));
assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("en"), "zip")));
assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("en"), "identity")));
assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("fr"), "zip")));
assertTrue(verifyVariant(variants, new Variant(mt2, new Locale("fr"), "identity")));
}