### Question:
TranslatedH2Exception extends DataAccessException { public int getErrorCode() { return errorCode; } TranslatedH2Exception(int errorCode, String error, String message); int getErrorCode(); String getError(); static final int UNKNOWN_ERROR_CODE; }### Answer:
@Test public void testGetErrorCode() { assertThat(e.getErrorCode(), is(ERROR_CODE)); }