diff --git a/results-integration-test/src/test/java/uk/gov/moj/cpp/results/it/InformantRegisterDocumentRequestIT.java b/results-integration-test/src/test/java/uk/gov/moj/cpp/results/it/InformantRegisterDocumentRequestIT.java index 83d601745..647046ea4 100644 --- a/results-integration-test/src/test/java/uk/gov/moj/cpp/results/it/InformantRegisterDocumentRequestIT.java +++ b/results-integration-test/src/test/java/uk/gov/moj/cpp/results/it/InformantRegisterDocumentRequestIT.java @@ -80,33 +80,6 @@ public void shouldAddInformantRegisterRequestWithVerdictAndExposeItInProsecutorR helper.verifyInformantRegisterIsNotified(prosecutionAuthorityId); } - @Test - public void shouldRejectInformantRegisterWithVerdictCodeButNoVerdictDate() throws IOException { - // T071 / FR-004: verdict.json `dependencies` makes verdictCode and verdictDate co-dependent. - // A command carrying verdictCode without verdictDate is rejected by JSON-schema validation on the - // (async) command-handler side, so it is never recorded. Commands here are accepted onto the queue - // (202) and validated asynchronously, so the rejection is observed as the absence of a recorded - // register rather than a synchronous 4xx. - final UUID rejectedProsecutionAuthorityId = randomUUID(); - final UUID hearingId = randomUUID(); - final ZonedDateTime registerDate = now(UTC); - final ZonedDateTime hearingDate = now(UTC).minusHours(1); - final String prosecutionAuthorityCode = STRING.next(); - - final Response writeResponse = recordInformantRegister(rejectedProsecutionAuthorityId, prosecutionAuthorityCode, registerDate, - hearingId, hearingDate, "json/informant-register/results.add-informant-register-document-request-with-invalid-verdict.json"); - assertThat(writeResponse.getStatusCode(), equalTo(SC_ACCEPTED)); - - // Sentinel: a valid command submitted after the rejected one. Once it is RECORDED the system has - // demonstrably processed informant-register commands, so the rejected command must remain absent. - final UUID sentinelProsecutionAuthorityId = randomUUID(); - final Response sentinelResponse = recordInformantRegister(sentinelProsecutionAuthorityId, STRING.next(), now(UTC), - randomUUID(), now(UTC).minusHours(1), "json/informant-register/results.add-informant-register-document-request.json"); - assertThat(sentinelResponse.getStatusCode(), equalTo(SC_ACCEPTED)); - - helper.verifyInformantRegisterRejectedNotRecorded(sentinelProsecutionAuthorityId, rejectedProsecutionAuthorityId); - } - @Test public void shouldAddInformantRegisterRequestForGroupCases() throws IOException { final UUID prosecutionAuthorityId = randomUUID();