@Test(expected = NullPointerException.class) public void badFileTest() throws IOException { URL resourceUrl = getClass().getResource(MAPPING_PATH); Context context = new Context(); context.put("mappingFile2", resourceUrl.getPath()); serializer = new ElasticSearchSerializerWithMapping(); serializer.configure(context); }
@Override public void configure(Context context) { String mappingFile = context.getString(CONF_MAPPING_FILE); try { jsonMapping = readFile(new File(mappingFile)); } catch (IOException e) { Throwables.propagate(e); } }
ElasticSearchSerializerWithMapping implements
		ElasticSearchIndexRequestBuilderFactory { @Override public void configure(Context context) { String mappingFile = context.getString(CONF_MAPPING_FILE); try { jsonMapping = readFile(new File(mappingFile)); } catch (IOException e) { Throwables.propagate(e); } } }
ElasticSearchSerializerWithMapping implements
		ElasticSearchIndexRequestBuilderFactory { @Override public void configure(Context context) { String mappingFile = context.getString(CONF_MAPPING_FILE); try { jsonMapping = readFile(new File(mappingFile)); } catch (IOException e) { Throwables.propagate(e); } }  }
ElasticSearchSerializerWithMapping implements
		ElasticSearchIndexRequestBuilderFactory { @Override public void configure(Context context) { String mappingFile = context.getString(CONF_MAPPING_FILE); try { jsonMapping = readFile(new File(mappingFile)); } catch (IOException e) { Throwables.propagate(e); } }  @Override void configure(Context context); @Override void configure(ComponentConfiguration conf); @Override IndexRequestBuilder createIndexRequest(Client client,
			String indexPrefix, String indexType, Event event); }
ElasticSearchSerializerWithMapping implements
		ElasticSearchIndexRequestBuilderFactory { @Override public void configure(Context context) { String mappingFile = context.getString(CONF_MAPPING_FILE); try { jsonMapping = readFile(new File(mappingFile)); } catch (IOException e) { Throwables.propagate(e); } }  @Override void configure(Context context); @Override void configure(ComponentConfiguration conf); @Override IndexRequestBuilder createIndexRequest(Client client,
			String indexPrefix, String indexType, Event event);  }