### Question:
StringItemSourceFactory implements ItemSourceFactory { @Override public ItemSource createEmptySource() { throw new UnsupportedOperationException(getClass().getSimpleName() + " cannot create empty source. Use buffer-based classes instead"); } StringItemSourceFactory(); @Override final boolean isBuffered(); @Override ItemSource create(Object event, ObjectWriter objectWriter); @Override ItemSource createEmptySource(); @PluginBuilderFactory static Builder newBuilder(); @Override void start(); @Override void stop(); @Override boolean isStarted(); @Override boolean isStopped();  }### Answer:
@Test public void createEmptySourceThrows() { StringItemSourceFactory factory = createDefaultTestStringItemSourceFactory(); expectedException.expect(UnsupportedOperationException.class); factory.createEmptySource(); }