@Test
public void testParseThreeAllowedReferersWithTrailingComma() {

    List<URI> uris = CsrfProtectionRefererFilter.parseAllowedReferers("http://my-site.com:45,https://other.site.com,http://wherever.edu,");
    assertEquals(3, uris.size());
    assertUri("http", "my-site.com", 45, uris.get(0));
    assertUri("https", "other.site.com", -1, uris.get(1));
    assertUri("http", "wherever.edu", -1, uris.get(2));
}