@Test
public void getConvocation() throws Exception {

    Set<Right> rights = new HashSet<>();
    rights.add(Right.CONVOCATION_DISPLAY);
    Assertions.assertThat(convocationRestController).isNotNull();
    Convocation convocation = createDummyConvocation();
    given(convocationService.getConvocation("uuid-convocation-test-one", "mairie-test")).willReturn(convocation);
    DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
    mockMvc.perform(get("/api/convocation/uuid-convocation-test-one")
            .requestAttr("STELA-Current-Profile-Rights", rights)
            .requestAttr("STELA-Current-Local-Authority-UUID", "mairie-test")
            .requestAttr("STELA-Current-Profile-UUID", "profile-one"))
            .andExpect(status().isOk())
            .andExpect(jsonPath("$.uuid").value(convocation.getUuid()))
            .andExpect(jsonPath("$.assemblyType").exists())
            .andExpect(jsonPath("$.location").value(convocation.getLocation()))
            .andExpect(jsonPath("$.meetingDate").value(formatter.format(convocation.getMeetingDate())))
            .andExpect(jsonPath("$.creationDate").value(formatter.format(convocation.getCreationDate())))
            .andExpect(jsonPath("$.questions").isArray());
    verify(convocationService, times(1)).getConvocation("uuid-convocation-test-one", "mairie-test");
}