@Test
public void testSecondDomain() {

  String[] testStrings = new String[] {
      "google.com -> google.com",
      "www.webaddict.za -> webaddict.za",
      "wilma     ->       null",
      "wilma.blogSpot.com  -> blogspot.com",
      "repubblica.it  -> repubblica.it",
      "isti.pomino.cnr.it -> cnr.it",
      "thelakersnation.com -> thelakersnation.com",
      "bio2rdf.org -> bio2rdf.org",
      "awakenedmmo.org -> awakenedmmo.org",
      "cheminfov.informatics.indiana.edu -> indiana.edu",
      "data-gov.tw.rpi.edu -> rpi.edu",
      "www.test.webaddict.co.za -> webaddict.co.za",
      "www.webaddict.co.za -> webaddict.co.za",
      "mxr.mozilla.org -> mozilla.org",
      "www.yago.zitgist.com -> zitgist.com",
      "aims.fao.org -> fao.org",
      "en.wikipedia.org -> wikipedia.org",
      "127.0.0.100 -> null",
      "http://en.wikipedia.org -> null"
  };
  for (String s : testStrings) {
    String[] elems = s.split("\\s+->\\s+");
    String domain = elems[0];
    String expectedSecondDomain = elems[1];
    logger.info("Check if sndDomain of {} equals {}", domain, expectedSecondDomain);
    final String sndDomain = URIUtil.getSndDomain(domain);
    assertEquals(sndDomain == null ? "null" : sndDomain, expectedSecondDomain);
  }
  assertEquals(null, URIUtil.getSndDomain(""));
  assertEquals(null, URIUtil.getSndDomain(null));
}