### Question:
AMAuthErrorCodeResponseStatusMapping { public int getAuthLoginExceptionResponseStatus(String authErrorCode) { int statusCode = Response.Status.UNAUTHORIZED.getStatusCode(); Map<String, Response.Status> authErrorCodeResponseStatuses = getAMAuthErrorCodeResponseStatuses(); Response.Status responseStatus = authErrorCodeResponseStatuses.get(authErrorCode); if (responseStatus == null && AMAuthErrorCode.AUTH_TIMEOUT.equals(authErrorCode)) { statusCode = 408; } else if (responseStatus != null) { statusCode = responseStatus.getStatusCode(); } return statusCode; }  int getAuthLoginExceptionResponseStatus(String authErrorCode);  }### Answer:
@Test public void shouldMapUnknownErrorCode() { String errorCode = "UNKNOWN_ERROR_CODE"; int httpStatusCode = amAuthErrorCodeResponseStatusMapping.getAuthLoginExceptionResponseStatus(errorCode); assertEquals(httpStatusCode, 401); }
@Test public void shouldMapAuthTimeoutErrorCode() { String errorCode = AMAuthErrorCode.AUTH_TIMEOUT; int httpStatusCode = amAuthErrorCodeResponseStatusMapping.getAuthLoginExceptionResponseStatus(errorCode); assertEquals(httpStatusCode, 408); }
@Test public void shouldMapErrorCode() { String errorCode = AMAuthErrorCode.AUTH_CONFIG_NOT_FOUND; int httpStatusCode = amAuthErrorCodeResponseStatusMapping.getAuthLoginExceptionResponseStatus(errorCode); assertEquals(httpStatusCode, 400); }