package com.here.account.oauth2;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class ErrorResponseTest {

    private String error = "error";
    private String errorDescription = "errorDescription";
    private String errorId = "errorId";
    private Integer httpStatus = 400;
    private Integer errorCode = 2;
    private String message = "message";
    private String title = "title";
    private Integer status = 400;
    private String code = "code";
    private String cause = "cause";
    private String action = "action";
    private String correlationId = "correlationId";

    @Test
    public void test_correlationId() {
        ErrorResponse errorResponse = new ErrorResponse(error,
                errorDescription,
                errorId,
                httpStatus,
                errorCode,
                message,
                title,
                status,
                code,
                cause,
                action,
                correlationId);
        String actualTitle = errorResponse.getTitle();
        assertTrue("expected title " + title + ", actual " + actualTitle,
                title.equals(actualTitle));

        Integer actualStatus = errorResponse.getStatus();
        assertTrue("expected status " + status + ", actual " + actualStatus,
            status.equals(actualStatus));

        String actualCode = errorResponse.getCode();
        assertTrue("expected code " + code + ", actual " + actualCode,
            code.equals(actualCode));

        String actualCause = errorResponse.getCause();
        assertTrue("expected cause " + cause + ", actual " + actualCause,
            cause.equals(actualCause));

        String actualAction = errorResponse.getAction();
        assertTrue("expected action " + action + ", actual " + actualAction,
            action.equals(actualAction));

        String actualCorrelationId = errorResponse.getCorrelationId();
        assertTrue("expected correlationId " + correlationId + ", actual " + actualCorrelationId,
                correlationId.equals(actualCorrelationId));
    }
}

@@ -607,16 +607,2666 @@
 onId%22;%0A%0A
+    ErrorResponse errorResponse;%0A%0A    @Test%0A    public void test_6arg_constructor() %7B%0A        errorResponse = new ErrorResponse(error,%0A                errorDescription,%0A                errorId,%0A                httpStatus,%0A                errorCode,%0A                message);%0A%0A        verifyFirst6Properties();%0A%0A        String actualTitle = errorResponse.getTitle();%0A        assertTrue(%22expected title %22 + null + %22, actual %22 + actualTitle,%0A                null == actualTitle);%0A%0A        Integer actualStatus = errorResponse.getStatus();%0A        assertTrue(%22expected status %22 + null + %22, actual %22 + actualStatus,%0A                null == (actualStatus));%0A%0A        String actualCode = errorResponse.getCode();%0A        assertTrue(%22expected code %22 + null + %22, actual %22 + actualCode,%0A                null == (actualCode));%0A%0A        String actualCause = errorResponse.getCause();%0A        assertTrue(%22expected cause %22 + null + %22, actual %22 + actualCause,%0A                null == (actualCause));%0A%0A        String actualAction = errorResponse.getAction();%0A        assertTrue(%22expected action %22 + null + %22, actual %22 + actualAction,%0A                null == (actualAction));%0A%0A        String actualCorrelationId = errorResponse.getCorrelationId();%0A        assertTrue(%22expected correlationId %22 + correlationId + %22, actual %22 + actualCorrelationId,%0A                null == (actualCorrelationId));%0A%0A    %7D%0A%0A    private void verifyFirst6Properties() %7B%0A        String actualError = errorResponse.getError();%0A        assertTrue(%22expected error %22 + error + %22, actual %22 + actualError,%0A                error.equals(actualError));%0A%0A        String actualErrorDescription = errorResponse.getErrorDescription();%0A        assertTrue(%22expected errorDescription %22 + errorDescription + %22, actual %22 + actualErrorDescription,%0A                errorDescription.equals(actualErrorDescription));%0A%0A        String actualErrorId = errorResponse.getErrorId();%0A        assertTrue(%22expected errorId %22 + errorId + %22, actual %22 + actualErrorId,%0A                errorId.equals(actualErrorId));%0A%0A        Integer actualHttpStatus = errorResponse.getHttpStatus();%0A        assertTrue(%22expected httpStatus %22 + httpStatus + %22, actual %22 + actualHttpStatus,%0A                httpStatus.equals(actualHttpStatus));%0A%0A        Integer actualErrorCode = errorResponse.getErrorCode();%0A        assertTrue(%22expected errorCode %22 + errorCode + %22, actual %22 + actualErrorCode,%0A                errorCode.equals(actualErrorCode));%0A%0A        String actualMessage = errorResponse.getMessage();%0A        assertTrue(%22expected message %22 + message + %22, actual %22 + actualMessage,%0A                message.equals(actualMessage));%0A%0A    %7D%0A%0A
     @Tes
@@ -3310,38 +3310,24 @@
 ) %7B%0A        
-ErrorResponse 
 errorRespons
@@ -3642,16 +3642,52 @@
 ionId);%0A
+%0A        verifyFirst6Properties();%0A%0A
         

add additional test for 6-arg constructor.