SkipFieldValueBolt extends AbstractLogicBolt { @Override public void configure(Configuration conf) { field = conf.getString(FIELD); value = conf.getString(VALUE); Validate.notBlank(field); Validate.notBlank(value); }  @Override void configure(Configuration conf); static final String FIELD; static final String VALUE; }
@Test public void testConfigure(@Injectable Configuration conf) { new Expectations() {{ conf.getString(SkipFieldValueBolt.FIELD); result = "field0"; conf.getString(SkipFieldValueBolt.VALUE); result = "value0"; }}; bolt.configure(conf); assertThat(bolt.field, is("field0")); assertThat(bolt.value, is("value0")); }