/* * Copyright 2015 Hewlett-Packard Development Company, L.P. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. */ package com.hp.autonomy.frontend.find.core.databases; import com.hp.autonomy.frontend.find.core.test.AbstractFindIT; import org.junit.Test; import org.springframework.http.MediaType; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.Matchers.empty; import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.authentication; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; public abstract class AbstractDatabasesControllerIT extends AbstractFindIT { @Test public void noExcludedIndexes() throws Exception { mockMvc.perform(get(DatabasesController.GET_DATABASES_PATH).with(authentication(userAuth()))) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andExpect(jsonPath("$", not(empty()))); } }