Assert.assertEquals(errorMessage.getErrorMessage(), "The destination URL was invalid: no protocol: as/");
}
@Test
public void testUpdateConnection_WebHDFS_invalidUrl() throws Exception {
JSONObject connectionObject = new JSONObjectBuilder()
.add("providerId", "rss")
.add("alias", "Test Bad RSS Feed 1")
.add("type", "feed")
.add("url", SAMPLE_FEED_FILE_PATH)
.add("visibility", "ACCOUNT")
.add("credentials", new JSONObjectBuilder().build())
.add("authType", "USERNAME_PASSWORD")
.array("outboundConfigurations", new JSONObjectBuilder()
.add("credentials", new JSONObjectBuilder()
.add("username", "hadoop")
.build())
.add("protocol", "webhdfs")
.add("destination", String.format("http://%s:%s/webhdfs/v1/", webhdfsProperties.getString("webhdfs.host"), webhdfsProperties.getString("webhdfs.port")))
.array("dataTypes", "INSIGHT")
.build())
.build();
JSONObject updateObject = new JSONObjectBuilder()
.add("alias", "Test Bad RSS Feed 1")
.array("outboundConfigurations", new JSONObjectBuilder()
.add("credentials", new JSONObjectBuilder()
.add("username", "df")
.build())
.add("protocol", "webhdfs")
.add("destination", "as")
.array("dataTypes", "INSIGHT")