// Path: sentimentr-client/sentimentr-connector/src/main/java/io/pivotal/fe/sentimentr/client/cloud/SentimentrServiceInfo.java
// public class SentimentrServiceInfo extends UriBasedServiceInfo {
//     public SentimentrServiceInfo(String id, String url) {
//         super(id, url);
//     }
// }
// 
// Path: sentimentr-client/sentimentr-connector/src/main/java/io/pivotal/fe/sentimentr/client/facade/SentimentrFacade.java
// public class SentimentrFacade {
// 	
// 	private String sentimentrUri;
// 
// 	public SentimentrFacade()
// 	{
// 	}
// 	public SentimentrFacade(String sentimentrUri)
// 	{
// 		this.sentimentrUri = sentimentrUri;
// 	}
// 	
// 	public Sentiment getSentiment(String text)
// 	{
// 		RestTemplate restTemplate = new RestTemplate();
// 		Sentiment sentiment = restTemplate.getForObject(sentimentrUri+"/{text}", Sentiment.class, text);
// 		return sentiment;
// 	}
// 
// }
// 
// Path: sentimentr-client/sentimentr-connector/src/main/java/io/pivotal/fe/sentimentr/client/facade/SentimentrFacadeFactory.java
// public class SentimentrFacadeFactory {
//     public SentimentrFacade create(String url) {
//         return new SentimentrFacade(url);
//     }
// 
//     public SentimentrFacade create(URL url) {
//         return create(url.toString());
//     }
// }


import org.springframework.cloud.service.AbstractServiceConnectorCreator;
import org.springframework.cloud.service.ServiceConnectorConfig;
import io.pivotal.fe.sentimentr.client.cloud.SentimentrServiceInfo;
import io.pivotal.fe.sentimentr.client.facade.SentimentrFacade;
import io.pivotal.fe.sentimentr.client.facade.SentimentrFacadeFactory;
package io.pivotal.fe.sentimentr.client.cloud.connector;



public class SentimentrConnectionCreator extends AbstractServiceConnectorCreator<SentimentrFacade, SentimentrServiceInfo> {
    @Override
    public SentimentrFacade create(SentimentrServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig) {
// Path: sentimentr-client/sentimentr-connector/src/main/java/io/pivotal/fe/sentimentr/client/cloud/SentimentrServiceInfo.java
// public class SentimentrServiceInfo extends UriBasedServiceInfo {
//     public SentimentrServiceInfo(String id, String url) {
//         super(id, url);
//     }
// }
// 
// Path: sentimentr-client/sentimentr-connector/src/main/java/io/pivotal/fe/sentimentr/client/facade/SentimentrFacade.java
// public class SentimentrFacade {
// 	
// 	private String sentimentrUri;
// 
// 	public SentimentrFacade()
// 	{
// 	}
// 	public SentimentrFacade(String sentimentrUri)
// 	{
// 		this.sentimentrUri = sentimentrUri;
// 	}
// 	
// 	public Sentiment getSentiment(String text)
// 	{
// 		RestTemplate restTemplate = new RestTemplate();
// 		Sentiment sentiment = restTemplate.getForObject(sentimentrUri+"/{text}", Sentiment.class, text);
// 		return sentiment;
// 	}
// 
// }
// 
// Path: sentimentr-client/sentimentr-connector/src/main/java/io/pivotal/fe/sentimentr/client/facade/SentimentrFacadeFactory.java
// public class SentimentrFacadeFactory {
//     public SentimentrFacade create(String url) {
//         return new SentimentrFacade(url);
//     }
// 
//     public SentimentrFacade create(URL url) {
//         return create(url.toString());
//     }
// }


// Path: sentimentr-client/sentimentr-connector/src/main/java/io/pivotal/fe/sentimentr/client/cloud/connector/SentimentrConnectionCreator.java
import org.springframework.cloud.service.AbstractServiceConnectorCreator;
import org.springframework.cloud.service.ServiceConnectorConfig;
import io.pivotal.fe.sentimentr.client.cloud.SentimentrServiceInfo;
import io.pivotal.fe.sentimentr.client.facade.SentimentrFacade;
import io.pivotal.fe.sentimentr.client.facade.SentimentrFacadeFactory;

package io.pivotal.fe.sentimentr.client.cloud.connector;



public class SentimentrConnectionCreator extends AbstractServiceConnectorCreator<SentimentrFacade, SentimentrServiceInfo> {
    @Override
    public SentimentrFacade create(SentimentrServiceInfo serviceInfo, ServiceConnectorConfig serviceConnectorConfig) {
        return new SentimentrFacadeFactory().create(serviceInfo.getUri());