// Path: heroku-api/src/main/java/com/heroku/api/exception/RequestFailedException.java
// public class RequestFailedException extends HerokuAPIException {
// 
//     String responseBody;
//     int statusCode;
// 
//     public RequestFailedException(String msg, int code, byte[] in) {
//         this(msg, code, getBodyFromInput(in));
// 
//     }
// 
//     private static String getBodyFromInput(byte[] in) {
//         try {
//             return HttpUtil.getUTF8String(in);
//         } catch (Exception e) {
//             return "There was also an error reading the response body.";
//         }
//     }
// 
//     public RequestFailedException(String msg, int code, String body) {
//         super(msg + " statuscode:" + code + " responseBody:" + body);
//         responseBody = body;
//         statusCode = code;
//     }
// 
// 
//     public String getResponseBody() {
//         return responseBody;
//     }
// 
//     public int getStatusCode() {
//         return statusCode;
//     }
// }


import com.google.inject.Provides;
import com.heroku.api.connection.FinagleConnection;
import com.heroku.api.connection.TwitterFutureConnection;
import com.heroku.api.exception.RequestFailedException;
import java.io.IOException;
package com.heroku.api;



public class FinagleModule extends ConnectionTestModule {

    @Provides
    TwitterFutureConnection getConnectionImpl() throws IOException {

        try {
            return FinagleConnection.apply();
// Path: heroku-api/src/main/java/com/heroku/api/exception/RequestFailedException.java
// public class RequestFailedException extends HerokuAPIException {
// 
//     String responseBody;
//     int statusCode;
// 
//     public RequestFailedException(String msg, int code, byte[] in) {
//         this(msg, code, getBodyFromInput(in));
// 
//     }
// 
//     private static String getBodyFromInput(byte[] in) {
//         try {
//             return HttpUtil.getUTF8String(in);
//         } catch (Exception e) {
//             return "There was also an error reading the response body.";
//         }
//     }
// 
//     public RequestFailedException(String msg, int code, String body) {
//         super(msg + " statuscode:" + code + " responseBody:" + body);
//         responseBody = body;
//         statusCode = code;
//     }
// 
// 
//     public String getResponseBody() {
//         return responseBody;
//     }
// 
//     public int getStatusCode() {
//         return statusCode;
//     }
// }


// Path: heroku-api-integration-tests/src/test/java/com/heroku/api/FinagleModule.java
import com.google.inject.Provides;
import com.heroku.api.connection.FinagleConnection;
import com.heroku.api.connection.TwitterFutureConnection;
import com.heroku.api.exception.RequestFailedException;
import java.io.IOException;

package com.heroku.api;



public class FinagleModule extends ConnectionTestModule {

    @Provides
    TwitterFutureConnection getConnectionImpl() throws IOException {

        try {
            return FinagleConnection.apply();
        } catch (RequestFailedException e) {