@Test public void createRequestSetsRequestIdInResponse() { final TrophyLeaderboardCreationResponse response = unit.process(request); assertThat(response, is(not(nullValue()))); assertThat(response.getRequestSpaceId(), is(equalTo(REQUEST_SPACE_ID))); }
@SuppressWarnings({"ThrowableInstanceNeverThrown"}) @Test public void createRequestWithErrorSetsRequestIdInResponse() { final TrophyLeaderboardCreationResponse response = unit.process(request); doThrow(new RuntimeException("TestEx")).when(trophyLeaderboardRepository).save(leaderboard); assertThat(response, is(not(nullValue()))); assertThat(response.getRequestSpaceId(), is(equalTo(REQUEST_SPACE_ID))); }