ServiceInvocationException extends RuntimeException { public static String getLocalizedMessage(final String key) { try { return resourceBundle.getString(key); } catch (final MissingResourceException e) { LOG.debug("resource not found: {}", key); return key; } } ServiceInvocationException(final int errorCode);  ServiceInvocationException(final String tenant, final int errorCode);  ServiceInvocationException(final int errorCode, final String msg);  ServiceInvocationException(final String tenant, final int errorCode, final String msg);  ServiceInvocationException(final int errorCode, final Throwable cause);  ServiceInvocationException(final String tenant, final int errorCode, final Throwable cause);  ServiceInvocationException(final String tenant, final int errorCode, final String msg, final Throwable cause); final int getErrorCode(); final String getTenant(); static int extractStatusCode(final Throwable t); static String getLocalizedMessage(final String key);  }
@Test public void testGetLocalizedMessage() { final String key = SendMessageTimeoutException.CLIENT_FACING_MESSAGE_KEY; assertThat(ServiceInvocationException.getLocalizedMessage(key)).isNotEqualTo(key); }