void getTablesTest_differentFromMaster()

in ddm-rrm/src/it/java/com/epam/digital/data/platform/management/CandidateVersionTableControllerIT.java [89:119]


    void getTablesTest_differentFromMaster() {
      final var versionCandidateId = context.createVersionCandidate();
      context.prepareRegistryDataSource(context.getGerritProps().getHeadBranch(),
          "liquibase/create-table_1.xml");
      context.prepareRegistryDataSource(versionCandidateId, "liquibase/create-table_2.xml");
      initStubs();

      mockMvc.perform(
          get("/versions/candidates/{versionCandidateId}/tables", versionCandidateId)
      ).andExpectAll(
          status().isOk(),
          content().contentType(MediaType.APPLICATION_JSON),
          jsonPath("$", hasSize(4)),
          jsonPath("$.[0].name", is("master_table")),
          jsonPath("$.[1].name", is("subject")),
          jsonPath("$.[2].name", is("subject_settings")),
          jsonPath("$.[3].name", is("table_2"))
      );

      mockMvc.perform(
          get("/versions/master/tables")
      ).andExpectAll(
          status().isOk(),
          content().contentType(MediaType.APPLICATION_JSON),
          jsonPath("$", hasSize(4)),
          jsonPath("$.[0].name", is("master_table")),
          jsonPath("$.[1].name", is("subject")),
          jsonPath("$.[2].name", is("subject_settings")),
          jsonPath("$.[3].name", is("table_1"))
      );
    }