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

    // Create some dummy formats
    final MessageFormat format1 = messageFormatTestTools.createMessageFormat("Format 1");
    final MessageFormat format2 = messageFormatTestTools.createMessageFormat("Format 2");
    // Hit index.
    mockMvc
        .perform(get("/configuration/messageFormat").with(user(adminUserDetails)))
        //.andDo(print())
        .andExpect(status().isOk())
        // Validate cluster 1
        .andExpect(content().string(containsString(format1.getName())))
        .andExpect(content().string(containsString(format1.getClasspath())))
        // Validate cluster 2
        .andExpect(content().string(containsString(format2.getName())))
        .andExpect(content().string(containsString(format2.getClasspath())));
}