@Test
public void testEmbedFlags_differentFlags() throws Exception {

    String regex1 = "ABC";
    String regex2 = "XYZ";
    String regex = "(" + util.embedFlags(regex1, 0) + ")|(" + util.embedFlags(regex2, Pattern.CASE_INSENSITIVE)
            + ")";
    assertEquals(true, "ABC".matches(regex));
    assertEquals(false, "abc".matches(regex));
    assertEquals(true, "XYZ".matches(regex));
    assertEquals(true, "xyz".matches(regex));
}