in ddm-rrm/src/it/java/com/epam/digital/data/platform/management/CandidateVersionControllerIT.java [140:165]
void getVersionDetails() {
final var versionCandidateId = context.createVersionCandidate(
TestVersionCandidate.builder()
.subject("John Doe's useless version candidate")
.topic("For fun")
.created(LocalDateTime.of(2022, 10, 28, 15, 12))
.updated(LocalDateTime.of(2022, 10, 29, 6, 47))
.mergeable(false)
.build()
);
mockMvc.perform(get("/versions/candidates/{versionCandidateId}", versionCandidateId)
.accept(MediaType.APPLICATION_JSON_VALUE)
).andExpectAll(
status().isOk(),
content().contentType("application/json"),
jsonPath("$.id", is(versionCandidateId)),
jsonPath("$.name", is("John Doe's useless version candidate")),
jsonPath("$.description", is("For fun")),
jsonPath("$.hasConflicts", is(true)),
jsonPath("$.creationDate", is("2022-10-28T15:12:00.000Z")),
jsonPath("$.latestUpdate", is("2022-10-29T06:47:00.000Z")),
jsonPath("$.author", is(context.getGerritProps().getUser())),
jsonPath("$.validations[0].result", is("PENDING"))
);
}