// Path: src/main/java/com/behase/relumin/model/ErrorResponse.java
// @Data
// @Builder
// @NoArgsConstructor
// @AllArgsConstructor
// public class ErrorResponse {
//     private Error error;
// 
//     public ErrorResponse(String code, String message) {
//         this.error = new Error();
//         this.error.code = code;
//         this.error.message = message;
//     }
// 
//     @Data
//     public static class Error {
//         private String code;
//         private String message;
//     }
// }


import com.behase.relumin.model.ErrorResponse;
import org.junit.Test;
import org.springframework.http.HttpStatus;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
package com.behase.relumin.exception;



public class ApiExceptionTest {
    @Test
    public void constructor() {
        ApiException apiException;

        apiException = new ApiException(new ErrorResponse("400", "message"), HttpStatus.BAD_REQUEST);
        assertThat(apiException.getErrorResponse(), is(new ErrorResponse("400", "message")));
        assertThat(apiException.getHttpStatus(), is(HttpStatus.BAD_REQUEST));

        apiException = new ApiException("400", "message", HttpStatus.BAD_REQUEST);
        assertThat(apiException.getErrorResponse(), is(new ErrorResponse("400", "message")));
// Path: src/main/java/com/behase/relumin/model/ErrorResponse.java
// @Data
// @Builder
// @NoArgsConstructor
// @AllArgsConstructor
// public class ErrorResponse {
//     private Error error;
// 
//     public ErrorResponse(String code, String message) {
//         this.error = new Error();
//         this.error.code = code;
//         this.error.message = message;
//     }
// 
//     @Data
//     public static class Error {
//         private String code;
//         private String message;
//     }
// }


// Path: src/test/java/com/behase/relumin/exception/ApiExceptionTest.java
import com.behase.relumin.model.ErrorResponse;
import org.junit.Test;
import org.springframework.http.HttpStatus;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

package com.behase.relumin.exception;



public class ApiExceptionTest {
    @Test
    public void constructor() {
        ApiException apiException;

        apiException = new ApiException(new ErrorResponse("400", "message"), HttpStatus.BAD_REQUEST);
        assertThat(apiException.getErrorResponse(), is(new ErrorResponse("400", "message")));
        assertThat(apiException.getHttpStatus(), is(HttpStatus.BAD_REQUEST));

        apiException = new ApiException("400", "message", HttpStatus.BAD_REQUEST);
        assertThat(apiException.getErrorResponse(), is(new ErrorResponse("400", "message")));
        assertThat(apiException.getHttpStatus(), is(HttpStatus.BAD_REQUEST));