// Path: common/src/main/java/cz/gopay/api/v3/GPClientException.java
// public class GPClientException extends Exception {
// 
//     private final int httpResultCode;
//     private final APIError error;
// 
//     public GPClientException(int httpResultCode, APIError error) {
//         this.error = error;
//         this.httpResultCode = httpResultCode;
//     }
// 
//     public APIError getError() {
//         return error;
//     }
// 
//     public Date getDateIssued() {
//         return error.getDateIssued();
//     }
// 
//     public List<ErrorElement> getErrorMessages() {
//         if (error.getErrorMessages() == null) 
//             return Collections.EMPTY_LIST;
//         return error.getErrorMessages();
//     }
// 
//     public String extractMessage() {
//         StringBuilder sb = new StringBuilder();
//         for (ErrorElement msg : getErrorMessages()) {
//             sb.append("RC[").append(httpResultCode).append("]");
//             if (msg.getField() != null) {
//                 sb.append("Field: ").append(msg.getField());
//             }
//             if (msg.getErrorName() != null) {
//                 sb.append(" Name: ").append(msg.getErrorName()).append("[").append(msg.getErrorCode()).append("]");
//             }
//             if (msg.getMessage() != null) {
//                 sb.append(" Msg: ").append(msg.getMessage());
//             }
//             if (msg.getDescription() != null) {
//                 sb.append(" Desc: ").append(msg.getDescription());
//             }
//         }
//         return sb.toString();
//     }
// }
// 
// Path: common/src/main/java/cz/gopay/api/v3/IGPConnector.java
// public interface IGPConnector {
// 
//     IGPConnector getAppToken(String clientId, String clientCredentials) throws GPClientException;
// 
//     IGPConnector getAppToken(String clientId, String clientCredentials,
//             String scope) throws GPClientException;
// 
//     Payment createPayment(BasePayment payment) throws GPClientException;
// 
//     PaymentResult refundPayment(Long id, Long amount) throws GPClientException;
// 
//     Payment createRecurrentPayment(Long id, NextPayment nextPayment) throws GPClientException;
// 
//     PaymentResult voidRecurrency(Long id) throws GPClientException;
// 
//     PaymentResult capturePayment(Long id) throws GPClientException;
//     
//     PaymentResult capturePayment(Long id, CapturePayment capturePayment) throws GPClientException;
// 
//     PaymentResult voidAuthorization(Long id) throws GPClientException;
// 
//     Payment paymentStatus(Long id) throws GPClientException;
//     
//     PaymentResult refundPayment(Long id, RefundPayment refundPayment) throws GPClientException;
// 
//     List<EETReceipt> findEETREceiptsByFilter(EETReceiptFilter filter) throws GPClientException;
//     
//     PaymentInstrumentRoot generatePaymentInstruments(Long goId, Currency currency) throws GPClientException;
//     
//     List<EETReceipt> getEETReceiptByPaymentId(Long id) throws GPClientException;
//     
//     byte[] generateStatement(AccountStatement accountStatement) throws GPClientException;
//     
//     String getApiUrl();
// 
//     AccessToken getAccessToken();
//     
//     void setAccessToken(AccessToken accessToken);
// }


import cz.gopay.api.v3.GPClientException;
import cz.gopay.api.v3.IGPConnector;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
package test.utils;



public abstract class LoginTests implements RestClientTest {

    private static final Logger logger = LogManager.getLogger(LoginTests.class);

    @Test
    public void testAuthApacheHttpClient() {
        try {
// Path: common/src/main/java/cz/gopay/api/v3/GPClientException.java
// public class GPClientException extends Exception {
// 
//     private final int httpResultCode;
//     private final APIError error;
// 
//     public GPClientException(int httpResultCode, APIError error) {
//         this.error = error;
//         this.httpResultCode = httpResultCode;
//     }
// 
//     public APIError getError() {
//         return error;
//     }
// 
//     public Date getDateIssued() {
//         return error.getDateIssued();
//     }
// 
//     public List<ErrorElement> getErrorMessages() {
//         if (error.getErrorMessages() == null) 
//             return Collections.EMPTY_LIST;
//         return error.getErrorMessages();
//     }
// 
//     public String extractMessage() {
//         StringBuilder sb = new StringBuilder();
//         for (ErrorElement msg : getErrorMessages()) {
//             sb.append("RC[").append(httpResultCode).append("]");
//             if (msg.getField() != null) {
//                 sb.append("Field: ").append(msg.getField());
//             }
//             if (msg.getErrorName() != null) {
//                 sb.append(" Name: ").append(msg.getErrorName()).append("[").append(msg.getErrorCode()).append("]");
//             }
//             if (msg.getMessage() != null) {
//                 sb.append(" Msg: ").append(msg.getMessage());
//             }
//             if (msg.getDescription() != null) {
//                 sb.append(" Desc: ").append(msg.getDescription());
//             }
//         }
//         return sb.toString();
//     }
// }
// 
// Path: common/src/main/java/cz/gopay/api/v3/IGPConnector.java
// public interface IGPConnector {
// 
//     IGPConnector getAppToken(String clientId, String clientCredentials) throws GPClientException;
// 
//     IGPConnector getAppToken(String clientId, String clientCredentials,
//             String scope) throws GPClientException;
// 
//     Payment createPayment(BasePayment payment) throws GPClientException;
// 
//     PaymentResult refundPayment(Long id, Long amount) throws GPClientException;
// 
//     Payment createRecurrentPayment(Long id, NextPayment nextPayment) throws GPClientException;
// 
//     PaymentResult voidRecurrency(Long id) throws GPClientException;
// 
//     PaymentResult capturePayment(Long id) throws GPClientException;
//     
//     PaymentResult capturePayment(Long id, CapturePayment capturePayment) throws GPClientException;
// 
//     PaymentResult voidAuthorization(Long id) throws GPClientException;
// 
//     Payment paymentStatus(Long id) throws GPClientException;
//     
//     PaymentResult refundPayment(Long id, RefundPayment refundPayment) throws GPClientException;
// 
//     List<EETReceipt> findEETREceiptsByFilter(EETReceiptFilter filter) throws GPClientException;
//     
//     PaymentInstrumentRoot generatePaymentInstruments(Long goId, Currency currency) throws GPClientException;
//     
//     List<EETReceipt> getEETReceiptByPaymentId(Long id) throws GPClientException;
//     
//     byte[] generateStatement(AccountStatement accountStatement) throws GPClientException;
//     
//     String getApiUrl();
// 
//     AccessToken getAccessToken();
//     
//     void setAccessToken(AccessToken accessToken);
// }


// Path: common-tests/src/main/java/test/utils/LoginTests.java
import cz.gopay.api.v3.GPClientException;
import cz.gopay.api.v3.IGPConnector;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

package test.utils;



public abstract class LoginTests implements RestClientTest {

    private static final Logger logger = LogManager.getLogger(LoginTests.class);

    @Test
    public void testAuthApacheHttpClient() {
        try {
            IGPConnector connector = getConnector().getAppToken(TestUtils.CLIENT_ID, TestUtils.CLIENT_SECRET);