UriUtils { public static boolean containsAbfsUrl(final String string) { if (string == null || string.isEmpty()) { return false; } return ABFS_URI_PATTERN.matcher(string).matches(); } private  UriUtils(); static boolean containsAbfsUrl(final String string); static String extractAccountNameFromHostName(final String hostName); static String generateUniqueTestPath();  }
@Test public void testIfUriContainsAbfs() throws Exception { Assert.assertTrue(UriUtils.containsAbfsUrl("abfs.dfs.core.windows.net")); Assert.assertTrue(UriUtils.containsAbfsUrl("abfs.dfs.preprod.core.windows.net")); Assert.assertFalse(UriUtils.containsAbfsUrl("abfs.dfs.cores.windows.net")); Assert.assertFalse(UriUtils.containsAbfsUrl("")); Assert.assertFalse(UriUtils.containsAbfsUrl(null)); Assert.assertFalse(UriUtils.containsAbfsUrl("abfs.dfs.cores.windows.net")); Assert.assertFalse(UriUtils.containsAbfsUrl("xhdfs.blob.core.windows.net")); }