ErrorCodeMapper { public static ErrorDetail getErrorCode(long projectSpecificErrorId) { ErrorDetail errorDetail = ERROR_MAP.get(projectSpecificErrorId); if (errorDetail == null) { errorDetail = new ErrorDetail(UNKNOWN_ERROR, "Unknown error with id " + projectSpecificErrorId); } return errorDetail; }  static ErrorDetail getErrorCode(long projectSpecificErrorId);  }
@Test public void testGetErrorCode() { ErrorCodeMapper.ErrorDetail errorDetail = ErrorCodeMapper.getErrorCode(800001L); assertThat(errorDetail.getErrorCode(), is(MISMATCHED_DATA_DIR_NUMBERS)); errorDetail = ErrorCodeMapper.getErrorCode(800002L); assertThat(errorDetail.getErrorCode(), is(PLATFORM_DATA_DIR_MISSING_IN_SOME_CONFIG_FILES)); errorDetail = ErrorCodeMapper.getErrorCode(800003L); assertThat(errorDetail.getErrorCode(), is(MISMATCHED_DATA_DIRS)); errorDetail = ErrorCodeMapper.getErrorCode(800004L); assertThat(errorDetail.getErrorCode(), is(NON_UNIQUE_PLATFORM_DATA_DIR_NAME)); errorDetail = ErrorCodeMapper.getErrorCode(800005L); assertThat(errorDetail.getErrorCode(), is(MULTIPLE_PLATFORM_DATA_DIRS)); errorDetail = ErrorCodeMapper.getErrorCode(900001L); assertThat(errorDetail.getErrorCode(), is(BOTH_WHITELIST_AND_DEPR_WHITELIST_PRESENT)); errorDetail = ErrorCodeMapper.getErrorCode(900002L); assertThat(errorDetail.getErrorCode(), is(MISMATCHED_SECURITY_CONFIGURATION)); errorDetail = ErrorCodeMapper.getErrorCode(700001L); assertThat(errorDetail.getErrorCode(), is(MISMATCHED_CLIENT_LEASE_DURATION)); errorDetail = ErrorCodeMapper.getErrorCode(500001L); assertThat(errorDetail.getErrorCode(), is(MISMATCHED_OFFHEAP_RESOURCE_NUMBERS)); errorDetail = ErrorCodeMapper.getErrorCode(500002L); assertThat(errorDetail.getErrorCode(), is(MISMATCHED_OFFHEAP_RESOURCES)); }