ESPushTaskConfig { public static Map<String,ESIndexSpec> getStreamMap(Config config) { List<String> streams = config.getList(CFG_ES_STREAMS); return streams.stream() .collect(Collectors.toMap(Function.identity(), stream -> getStreamConfig(stream, config))); }  static boolean isStreamConfig(Config config); static ESIndexSpec getDefaultConfig(Config config); static Map<String,ESIndexSpec> getStreamMap(Config config); final static String CFS_ES_SYSTEM_NAME; final static String CFG_ES_STREAM_NAME; final static String CFG_ES_STREAMS; final static String CFG_ES_DEFAULT_DOC_METADATA_SRC; final static String CFG_ES_STREAM_DOC_METADATA_SRC; final static String CFG_ES_DEFAULT_INDEX_PREFIX; final static String CFG_ES_STREAM_INDEX_PREFIX; final static String CFG_ES_DEFAULT_INDEX_DATE_FORMAT; final static String CFG_ES_STREAM_INDEX_DATE_FORMAT; final static String CFG_ES_DEFAULT_INDEX_DATE_ZONE; final static String CFG_ES_STREAM_INDEX_DATE_ZONE; final static String CFG_ES_DEFAULT_DOC_TYPE; final static String CFG_ES_STREAM_DOC_TYPE; final static String CFG_ES_DEFAULT_VERSION_TYPE_DEFAULT; final static String CFG_ES_STREAM_VERSION_TYPE_DEFAULT; }
@Test(expected = ConfigException.class) public void testMissingStreamsParam() throws Exception { Map<String, String> map = new HashMap<String, String>(); ESPushTaskConfig.getStreamMap(new MapConfig(map)); }
@Test(expected = ConfigException.class) public void testEmptyStreamsParam() throws Exception { Map<String, String> map = new HashMap<String, String>(); map.put("rico.es.streams", ""); ESPushTaskConfig.getStreamMap(new MapConfig(map)); }