@Test public void test_regularPostingAccountWithData_SuccessfullNoContent() throws Exception { final ErrorResponse expected = new ErrorResponse(); expected.setCode(ErrorCode.POSTINGACCOUNT_STILL_REFERENCED.getErrorCode()); expected.setMessage( "The posting account cannot be deleted because it is still referenced by a flow of money or a predefined flow of money!"); PostingAccount postingAccount = this.postingAccountService.getPostingAccountById( new PostingAccountID(PostingAccountTransportBuilder.POSTING_ACCOUNT1_ID)); Assert.assertNotNull(postingAccount); final ErrorResponse response = super.callUsecaseWithoutContent( "/" + PostingAccountTransportBuilder.POSTING_ACCOUNT1_ID, this.method, false, ErrorResponse.class); postingAccount = this.postingAccountService.getPostingAccountById( new PostingAccountID(PostingAccountTransportBuilder.POSTING_ACCOUNT1_ID)); Assert.assertNotNull(postingAccount); Assert.assertEquals(expected, response); }