Skip to content

Commit 32d66d1

Browse files
committed
test(Discovery): Fix wrongly written tests
1 parent 95c759a commit 32d66d1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.ibm.cloud.sdk.core.security.BearerTokenAuthenticator;
2323
import com.ibm.cloud.sdk.core.security.IamAuthenticator;
2424
import com.ibm.cloud.sdk.core.service.exception.BadRequestException;
25-
import com.ibm.cloud.sdk.core.service.exception.ForbiddenException;
2625
import com.ibm.cloud.sdk.core.service.exception.InternalServerErrorException;
2726
import com.ibm.cloud.sdk.core.service.exception.NotFoundException;
2827
import com.ibm.cloud.sdk.core.service.exception.UnauthorizedException;
@@ -421,7 +420,7 @@ public void badCredentialsThrowsException() {
421420
badService.listEnvironments(null).execute().getResult();
422421
}
423422

424-
@Test(expected = ForbiddenException.class)
423+
@Test(expected = NotFoundException.class)
425424
public void pingBadUrlThrowsException() {
426425
discovery.setServiceUrl("https://gateway.watsonplatform.net/discovery-foo/api");
427426
ping();
@@ -1828,8 +1827,8 @@ public void tokenizationDictionaryOperationsAreSuccessful() throws InterruptedEx
18281827
TokenDictRule tokenDictRule = new TokenDictRule.Builder()
18291828
.text("token")
18301829
.partOfSpeech("noun")
1831-
.readings(Arrays.asList("reading 1", "reading 2"))
1832-
.tokens(Arrays.asList("token 1", "token 2"))
1830+
.readings(Arrays.asList("reading_1", "reading_2"))
1831+
.tokens(Arrays.asList("token_1", "token_2"))
18331832
.build();
18341833

18351834
// the service doesn't seem to like when we try and move too fast

0 commit comments

Comments
 (0)