ContextPropsConverter extends ClassicConverter { @Override public void start() { customFieldsAdapter.initialize(getContext()); converter.setExclusions(calculateExclusions()); super.start(); }  @Override String convert(ILoggingEvent event); @Override void start(); static final String WORD; }
@Test public void initalizesAdapter() throws Exception { converter.start(); verify(customFieldsAdapter).initialize(context); }
@Test public void setsExclusionsFromOptionsList() throws Exception { converter.setOptionList(asList("this key", "that key")); converter.start(); verify(defaultConverter).setExclusions(exclusions.capture()); assertThat(exclusions.getValue(), hasItems("this key", "that key")); }
@Test public void setsExclusionsFromCustomFieldsAdapter() throws Exception { when(customFieldsAdapter.getCustomFieldExclusions()).thenReturn(asList("this key", "that key")); converter.start(); verify(defaultConverter).setExclusions(exclusions.capture()); assertThat(exclusions.getValue(), hasItems("this key", "that key")); }