@Test
public void testAbbreviateWithRegExp() {

    Abbreviation abbreviation = new Abbreviation(".*\\.qaware", "Q");
    assertThat(abbreviation.abbreviate("de.qaware"), is("Q"));
    assertThat(abbreviation.abbreviate("com.qaware"), is("Q"));
    assertThat(abbreviation.abbreviate("de.qaware.qav"), is("Q.qav"));
    assertThat(abbreviation.abbreviate("com.qaware.qav"), is("Q.qav"));
}