@Test
public void testFilterWithPrefix() throws ParseException {

    final String LINK = "</test/1>;rt=\"dummy-rt\","
            + "</test/2>;rt=\"dummy-rt dummy-rt2\";obs;media=text/plain,"
            + "</test/3>;rt=\"dummy-rt3\";obs,"
            + "</test/4>";
    List<LinkFormat> list = LinkFormatBuilder.parseLinkAsList(LINK);
    List<LinkFormat> links = LinkFormatBuilder.filter(list, DataConvertingUtility.parseUriQuery("rt=dummy-*"));
    assertNotNull(links);
    assertEquals(3, links.size());
    links = LinkFormatBuilder.filter(list, DataConvertingUtility.parseUriQuery("rt=*"));
    assertNotNull(links);
    assertEquals(3, links.size());
    links = LinkFormatBuilder.filter(list, DataConvertingUtility.parseUriQuery("obs=*"));
    assertNotNull(links);
    assertEquals(2, links.size());
    links = LinkFormatBuilder.filter(list, DataConvertingUtility.parseUriQuery("media=text*"));
    assertNotNull(links);
    assertEquals(1, links.size());
    assertEquals("/test/2", links.get(0).getUri());
    links = LinkFormatBuilder.filter(list, DataConvertingUtility.parseUriQuery("rt=dummy*&media=text/plain"));
    assertNotNull(links);
    assertEquals(1, links.size());
    links = LinkFormatBuilder.filter(list, DataConvertingUtility.parseUriQuery("href=/test/1"));
    assertNotNull(links);
    assertEquals(1, links.size());
    links = LinkFormatBuilder.filter(list, DataConvertingUtility.parseUriQuery("href=/test*"));
    assertNotNull(links);
    assertEquals(4, links.size());
}