package com.ibm.watson.developer_cloud.service;

import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class AuthenticationTest {
  private static final String APIKEY = "12345";

  public class TestService extends WatsonService {
    private static final String SERVICE_NAME = "test";

    public TestService() {
      super(SERVICE_NAME);
    }
  }

  @Test
  public void authenticateWithApiKeyAsUsername() {
    TestService service = new TestService();
    service.setUsernameAndPassword("apikey", APIKEY);
    assertTrue(service.isTokenManagerSet());
  }
}

@@ -108,16 +108,60 @@
 ertTrue;
+%0Aimport static org.junit.Assert.assertFalse;
 %0A%0Apublic
@@ -224,20 +224,134 @@
 g APIKEY
- = %22
+_USERNAME = %22apikey%22;%0A  private static final String APIKEY = %2212345%22;%0A  private static final String ICP_APIKEY = %22icp-
 12345%22;%0A
@@ -666,18 +666,231 @@
 ord(
-%22apikey%22, 
+APIKEY_USERNAME, APIKEY);%0A    assertTrue(service.isTokenManagerSet());%0A  %7D%0A%0A  @Test%0A  public void authenticateWithIcp() %7B%0A    TestService service = new TestService();%0A    service.setUsernameAndPassword(APIKEY_USERNAME, ICP_
 APIK
@@ -896,35 +896,36 @@
 KEY);%0A    assert
-Tru
+Fals
 e(service.isToke

Add test for ICP auth