### Question:
ESUtils { public static void createIndex(String url, String indexName) throws Exception { String esUrl = new StringBuilder(url).append("/").append(indexName).toString(); CommonUtils.doHttpPut(esUrl, null); }  static List<Map<String, String>> getResourcesFromEs(String index, String targetType,
            Map<String, String> filter, List<String> fields); @SuppressWarnings("unchecked") static long getTotalDocumentCountForIndexAndType(String url, String index, String type,
            Map<String, Object> filter, Map<String, Object> mustNotFilter, HashMultimap<String, Object> shouldFilter); static boolean isValidIndex(final String url, final String index); static boolean isValidType(final String url, final String index, final String type); static String getEsUrl(); static String createMapping(String esUrl, String index, String type); static String createMappingWithParent(String esUrl, String index, String type, String parentType); static void createIndex(String url, String indexName); static void ensureIndexAndTypeForAnnotation(Annotation annotation, Boolean createIndexIfNotFound); static String buildIndexNameFromAnnotation(final Annotation annotation); static String getIssueTypeFromAnnotation(Annotation annotation); @SuppressWarnings("unchecked") static List<Map<String, String>> getDataFromES(final String url, String dataSource, String entityType,
            Map<String, Object> mustFilter, final Map<String, Object> mustNotFilter,
            final HashMultimap<String, Object> shouldFilter, List<String> fields, long from, long size); static String convertAttributetoKeyword(String attributeName); static Map<String, String> getDocumentForId(String index, String targetType, String _id); static Boolean publishMetrics(Map<String, Object> evalResults,String type); static int getESPort(); static String getESHost(); static Boolean doESPublish(Map<String, Object> evalResults, String indexName, String type); static Boolean doESUpdate(String docId,Map<String, Object> evalResults, String indexName, String type); static String createKeyword(final String key);  }### Answer:
@Test public void testCreateIndex() throws Exception{ PowerMockito.mockStatic(CommonUtils.class); PowerMockito.when(CommonUtils.doHttpPut(anyString(), anyString())).thenReturn("{}"); ESUtils.createIndex(DUMMY_ES_HOST, "testIndex"); }