@Test
@Transactional
public void testIndex() throws Exception {

    // Create some dummy clusters
    final Cluster cluster1 = clusterTestTools.createCluster("My Test Cluster 1 2 3");
    final Cluster cluster2 = clusterTestTools.createCluster("Some other Cluster");
    // Hit index.
    mockMvc
        .perform(get("/configuration/cluster").with(user(adminUserDetails)))
        //.andDo(print())
        .andExpect(status().isOk())
        // Validate cluster 1
        .andExpect(content().string(containsString(cluster1.getName())))
        .andExpect(content().string(containsString(cluster1.getBrokerHosts())))
        // Validate cluster 2
        .andExpect(content().string(containsString(cluster2.getName())))
        .andExpect(content().string(containsString(cluster2.getBrokerHosts())));
}