|
13 | 13 | package com.ibm.watson.natural_language_understanding.v1; |
14 | 14 |
|
15 | 15 |
|
16 | | -import com.ibm.cloud.sdk.core.security.basicauth.BasicAuthConfig; |
| 16 | +import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator; |
17 | 17 | import com.ibm.watson.common.WatsonServiceUnitTest; |
18 | 18 | import com.ibm.watson.natural_language_understanding.v1.model.AnalysisResults; |
19 | 19 | import com.ibm.watson.natural_language_understanding.v1.model.AnalyzeOptions; |
@@ -68,11 +68,7 @@ public class NaturalLanguageUnderstandingTest extends WatsonServiceUnitTest { |
68 | 68 | @Before |
69 | 69 | public void setUp() throws Exception { |
70 | 70 | super.setUp(); |
71 | | - BasicAuthConfig authConfig = new BasicAuthConfig.Builder() |
72 | | - .username("") |
73 | | - .password("") |
74 | | - .build(); |
75 | | - service = new NaturalLanguageUnderstanding("2018-11-16", authConfig); |
| 71 | + service = new NaturalLanguageUnderstanding("2018-11-16", new NoAuthAuthenticator()); |
76 | 72 | service.setEndPoint(getMockWebServerUrl()); |
77 | 73 |
|
78 | 74 | modelId = "foo"; |
@@ -152,7 +148,7 @@ public void testModelOptions() throws InterruptedException { |
152 | 148 | keywordsOptions.newBuilder(); |
153 | 149 |
|
154 | 150 | // MetadataOptions |
155 | | - MetadataOptions metadataOptions = new MetadataOptions(); |
| 151 | + MetadataOptions metadataOptions = new MetadataOptions.Builder().build(); |
156 | 152 | assertNotNull(metadataOptions); |
157 | 153 |
|
158 | 154 | // RelationsOptions |
@@ -298,7 +294,7 @@ public void testNullModelId() { |
298 | 294 | @Test(expected = IllegalArgumentException.class) |
299 | 295 | public void testNullVersion() { |
300 | 296 | @SuppressWarnings("unused") |
301 | | - NaturalLanguageUnderstanding service2 = new NaturalLanguageUnderstanding(null); |
| 297 | + NaturalLanguageUnderstanding service2 = new NaturalLanguageUnderstanding(null, new NoAuthAuthenticator()); |
302 | 298 | } |
303 | 299 |
|
304 | 300 | } |
0 commit comments