+ configProperties.put("ml.babel.KEYSTORE_FILE", "src/test/resources/auth/aai-client-dummy.p12");
+ configProperties.put("ml.babel.TRUSTSTORE_PASSWORD", "OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0");
+ // In a real deployment this would be a different file (to the client keystore)
+ configProperties.put("ml.babel.TRUSTSTORE_FILE", "src/test/resources/auth/aai-client-dummy.p12");
+ configProperties.put("ml.babel.BASE_URL", "http://localhost:8080/");
+ configProperties.put("ml.babel.GENERATE_ARTIFACTS_URL", "generate");
+ BabelServiceClient client =
+ new HttpsBabelServiceClientFactory().create(new ModelLoaderConfig(configProperties, "."));
+ List<BabelArtifact> result =
+ client.postArtifact(readBytesFromFile("compressedArtifacts/service-VscpaasTest-csar.csar"),
+ "service-Vscpass-Test", "1.0", "Test-Transaction-ID-BabelClient");
+ assertThat(result.size(), is(equalTo(3)));
+ }
+
+ @Test
+ public void testRestClientHttp() throws BabelServiceClientException, IOException, URISyntaxException {
+ Properties configProperties = new Properties();
+ configProperties.put("ml.babel.USE_HTTPS", "false");