// Path: application/common-exceptions/src/main/java/com/tripsta/common/exceptions/ExceptionType.java
// public enum ExceptionType {
// 
//   /**
//    * Custom Exception Types, used to group exceptions
//    * <p>
//    * UNKNOWN - Unhandled Exception
//    * NO_IMPL - Not yet implemented
//    * BIZ_RULE - Business Rule
//    * AUTH_EXC - Authentication exception
//    * AUTH_TIMEOUT - Authentication Timeout
//    * AUTHORIZATION - Authorization exception
//    * FIELD_VALIDATION - Field is not valid
//    * RE_FIELD_MISSING - Required Field Missing from Request
//    * ADVISORY - Informational Exception
//    * PROCESSING_EXCEPTION -
//    * APPLICATION_ERROR -
//    */
// 
//   UNKNOWN("1"), NO_IMPL("2"), BIZ_RULE("3"), AUTH_EXC("4"), AUTH_TIMEOUT("5"), AUTHORIZATION("6"), FIELD_VALIDATION("7"),
//   RE_FIELD_MISSING("10"), ADVISORY("11"), PROCESSING_EXCEPTION("12"), APPLICATION_ERROR("13");
// 
//   private String exceptionTypeCode;
// 
//   ExceptionType(String exceptionTypeCode) {
//     this.exceptionTypeCode = exceptionTypeCode;
//   }
// 
//   public String getErrorCode() {
//     return exceptionTypeCode;
//   }
// }


import org.junit.Test;
import com.tripsta.common.exceptions.ExceptionType;
import static org.junit.Assert.assertEquals;
package com.tripsta.common.exceptions;




public class ExceptionTypeTest {

  @Test
  public void testMessages() throws Exception {

    assertEquals("11", ExceptionType.ADVISORY.getErrorCode());
    assertEquals("13", ExceptionType.APPLICATION_ERROR.getErrorCode());
    assertEquals("4", ExceptionType.AUTH_EXC.getErrorCode());
    assertEquals("5", ExceptionType.AUTH_TIMEOUT.getErrorCode());
    assertEquals("6", ExceptionType.AUTHORIZATION.getErrorCode());
    assertEquals("3", ExceptionType.BIZ_RULE.getErrorCode());
    assertEquals("7", ExceptionType.FIELD_VALIDATION.getErrorCode());
    assertEquals("2", ExceptionType.NO_IMPL.getErrorCode());
    assertEquals("12", ExceptionType.PROCESSING_EXCEPTION.getErrorCode());
    assertEquals("10", ExceptionType.RE_FIELD_MISSING.getErrorCode());
// Path: application/common-exceptions/src/main/java/com/tripsta/common/exceptions/ExceptionType.java
// public enum ExceptionType {
// 
//   /**
//    * Custom Exception Types, used to group exceptions
//    * <p>
//    * UNKNOWN - Unhandled Exception
//    * NO_IMPL - Not yet implemented
//    * BIZ_RULE - Business Rule
//    * AUTH_EXC - Authentication exception
//    * AUTH_TIMEOUT - Authentication Timeout
//    * AUTHORIZATION - Authorization exception
//    * FIELD_VALIDATION - Field is not valid
//    * RE_FIELD_MISSING - Required Field Missing from Request
//    * ADVISORY - Informational Exception
//    * PROCESSING_EXCEPTION -
//    * APPLICATION_ERROR -
//    */
// 
//   UNKNOWN("1"), NO_IMPL("2"), BIZ_RULE("3"), AUTH_EXC("4"), AUTH_TIMEOUT("5"), AUTHORIZATION("6"), FIELD_VALIDATION("7"),
//   RE_FIELD_MISSING("10"), ADVISORY("11"), PROCESSING_EXCEPTION("12"), APPLICATION_ERROR("13");
// 
//   private String exceptionTypeCode;
// 
//   ExceptionType(String exceptionTypeCode) {
//     this.exceptionTypeCode = exceptionTypeCode;
//   }
// 
//   public String getErrorCode() {
//     return exceptionTypeCode;
//   }
// }


// Path: application/common-exceptions/src/test/java/com/tripsta/common/exceptions/ExceptionTypeTest.java
import org.junit.Test;
import com.tripsta.common.exceptions.ExceptionType;
import static org.junit.Assert.assertEquals;

package com.tripsta.common.exceptions;




public class ExceptionTypeTest {

  @Test
  public void testMessages() throws Exception {

    assertEquals("11", ExceptionType.ADVISORY.getErrorCode());
    assertEquals("13", ExceptionType.APPLICATION_ERROR.getErrorCode());
    assertEquals("4", ExceptionType.AUTH_EXC.getErrorCode());
    assertEquals("5", ExceptionType.AUTH_TIMEOUT.getErrorCode());
    assertEquals("6", ExceptionType.AUTHORIZATION.getErrorCode());
    assertEquals("3", ExceptionType.BIZ_RULE.getErrorCode());
    assertEquals("7", ExceptionType.FIELD_VALIDATION.getErrorCode());
    assertEquals("2", ExceptionType.NO_IMPL.getErrorCode());
    assertEquals("12", ExceptionType.PROCESSING_EXCEPTION.getErrorCode());
    assertEquals("10", ExceptionType.RE_FIELD_MISSING.getErrorCode());
    assertEquals("1", ExceptionType.UNKNOWN.getErrorCode());