@@ -0,0 +1,3559 @@
+/**%0A * Copyright 2017 IBM Corp. All Rights Reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file except in compliance with%0A * the License. You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on%0A * an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the%0A * specific language governing permissions and limitations under the License.%0A */%0Apackage com.ibm.watson.developer_cloud.natural_language_understanding.v1;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0A%0Aimport java.io.File;%0Aimport java.util.List;%0A%0Aimport org.junit.Assume;%0Aimport org.junit.AssumptionViolatedException;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.FixMethodOrder;%0Aimport org.junit.runners.MethodSorters;%0A%0Aimport com.ibm.watson.developer_cloud.WatsonServiceTest;%0Aimport com.ibm.watson.developer_cloud.natural_language_understanding.v1.model.*;%0Aimport com.ibm.watson.developer_cloud.service.exception.NotFoundException;%0A%0A/**%0A * The Class NaturalLanguageunderstandingTest.%0A */%0A@FixMethodOrder(MethodSorters.NAME_ASCENDING)%0Apublic class NaturalLanguageUnderstandingIT extends WatsonServiceTest %7B%0A%0A  /** The service. */%0A  private NaturalLanguageUnderstanding service;%0A%0A  /*%0A   * (non-Javadoc)%0A   *%0A   * @see com.ibm.watson.developer_cloud.WatsonServiceTest#setUp()%0A   */%0A  @Override%0A  @Before%0A  public void setUp() throws Exception %7B%0A    super.setUp();%0A    String username = getProperty(%22natural_language_understanding.username%22);%0A    String password = getProperty(%22natural_language_understanding.password%22);%0A%0A    Assume.assumeFalse(%22config.properties doesn't have valid credentials.%22,%0A        (username == null) %7C%7C username.equals(PLACEHOLDER));%0A%0A    service = new NaturalLanguageUnderstanding(NaturalLanguageUnderstanding.VERSION_DATE_2017_02_27);%0A    service.setDefaultHeaders(getDefaultHeaders());%0A    service.setUsernameAndPassword(username, password);%0A    service.setEndPoint(getProperty(%22natural_language_understanding.url%22));%0A  %7D%0A%0A  /**%0A   * .%0A   *%0A   * @throws Exception the exception%0A   */%0A  @Test%0A  public void aCreate() throws Exception %7B%0A%0A    String text = %22In remote corners of the world, citizens are demanding respect for the dignity of all people no matter their gender, or race, or religion, or disability, or sexual orientation, and those who deny others dignity are subject to public reproach. An explosion of social media has given ordinary people more ways to express themselves, and has raised people's expectations for those of us in power. Indeed, our international order has been so successful that we take it as a given that great powers no longer fight world wars; that the end of the Cold War lifted the shadow of nuclear Armageddon; that the battlefields of Europe have been replaced by peaceful union; that China and India remain on a path of remarkable growth.%22;%0A    ConceptsOptions concepts = new ConceptsOptions();%0A    concepts.setLimit(5);%0A    Features features = new Features.Builder().concepts(concepts).build();%0A    Parameters parameters = new Parameters.Builder().text(text).features(features).returnAnalyzedText(true).build();%0A%0A    AnalysisResults results = service.analyze(parameters).execute();%0A%0A    assertNotNull(results);%0A    assertNotNull(results.getAnalyzedText());%0A    assertNotNull(results.getConcepts());%0A%0A  %7D%0A%0A%7D%0A

Add integration test file