@Test public void toBtpError() { final BtpRuntimeException exception = new BtpRuntimeException(BtpErrorCode.F00_NotAcceptedError, ERROR_MESSAGE); final BtpError error = exception.toBtpError(REQUEST_ID); assertThat(error.getErrorCode()).isEqualTo(BtpErrorCode.F00_NotAcceptedError); assertThat(error.getTriggeredAt()).isEqualTo(exception.getTriggeredAt()); assertThat(error.getErrorData().length).isEqualTo(0); }
public BtpError toBtpError(long requestId) { return toBtpError(requestId, new BtpSubProtocols()); }
BtpRuntimeException extends RuntimeException { public BtpError toBtpError(long requestId) { return toBtpError(requestId, new BtpSubProtocols()); } }
BtpRuntimeException extends RuntimeException { public BtpError toBtpError(long requestId) { return toBtpError(requestId, new BtpSubProtocols()); } BtpRuntimeException();  BtpRuntimeException(BtpErrorCode code, String message);  BtpRuntimeException(BtpErrorCode code, String message, Throwable cause);  BtpRuntimeException(Throwable cause); }
BtpRuntimeException extends RuntimeException { public BtpError toBtpError(long requestId) { return toBtpError(requestId, new BtpSubProtocols()); } BtpRuntimeException();  BtpRuntimeException(BtpErrorCode code, String message);  BtpRuntimeException(BtpErrorCode code, String message, Throwable cause);  BtpRuntimeException(Throwable cause); BtpErrorCode getCode(); Instant getTriggeredAt(); BtpError toBtpError(long requestId); BtpError toBtpError(long requestId, BtpSubProtocols subProtocols); }
BtpRuntimeException extends RuntimeException { public BtpError toBtpError(long requestId) { return toBtpError(requestId, new BtpSubProtocols()); } BtpRuntimeException();  BtpRuntimeException(BtpErrorCode code, String message);  BtpRuntimeException(BtpErrorCode code, String message, Throwable cause);  BtpRuntimeException(Throwable cause); BtpErrorCode getCode(); Instant getTriggeredAt(); BtpError toBtpError(long requestId); BtpError toBtpError(long requestId, BtpSubProtocols subProtocols);  }