Skip to content
Snippets Groups Projects
Commit 0a1fae58 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-6891 Cleanup

parent c3d1baa8
Branches
Tags
No related merge requests found
...@@ -753,9 +753,10 @@ class XtaClientTest { ...@@ -753,9 +753,10 @@ class XtaClientTest {
@DisplayName("should throw exception if service not available") @DisplayName("should throw exception if service not available")
@Test @Test
void shouldThrowExceptionIfServiceNotAvailable() { void shouldThrowExceptionIfServiceNotAvailable() {
var metaData = message.metaData();
doReturn(false).when(service).lookupService(message.metaData()); doReturn(false).when(service).lookupService(message.metaData());
assertThatThrownBy(() -> client.throwExceptionIfServiceNotAvailable(message.metaData())) assertThatThrownBy(() -> client.throwExceptionIfServiceNotAvailable(metaData))
.isInstanceOf(XtaClientRuntimeException.class); .isInstanceOf(XtaClientRuntimeException.class);
} }
} }
......
...@@ -82,9 +82,9 @@ class XtaExceptionHandlerTest { ...@@ -82,9 +82,9 @@ class XtaExceptionHandlerTest {
@DisplayName("should keep message if no cause") @DisplayName("should keep message if no cause")
@Test @Test
void shouldKeepMessageIfNoCause() { void shouldKeepMessageIfNoCause() {
var exception = new XtaClientRuntimeException(MESSAGE); var exceptionWithoutCause = new XtaClientRuntimeException(MESSAGE);
var result = exceptionHandler.deriveXtaClientExceptionFromClientRuntimeException(exception); var result = exceptionHandler.deriveXtaClientExceptionFromClientRuntimeException(exceptionWithoutCause);
assertThat(result.getMessage()).isEqualTo(MESSAGE); assertThat(result.getMessage()).isEqualTo(MESSAGE);
} }
...@@ -93,9 +93,9 @@ class XtaExceptionHandlerTest { ...@@ -93,9 +93,9 @@ class XtaExceptionHandlerTest {
@Test @Test
void shouldKeepMessageIfCauseIsNotAnXtaException() { void shouldKeepMessageIfCauseIsNotAnXtaException() {
var cause = new Exception(); var cause = new Exception();
var exception = new XtaClientRuntimeException(MESSAGE, cause); var exceptionWithNoXtaCause = new XtaClientRuntimeException(MESSAGE, cause);
var result = exceptionHandler.deriveXtaClientExceptionFromClientRuntimeException(exception); var result = exceptionHandler.deriveXtaClientExceptionFromClientRuntimeException(exceptionWithNoXtaCause);
assertThat(result.getMessage()).isEqualTo(MESSAGE); assertThat(result.getMessage()).isEqualTo(MESSAGE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment