### Question:
Stanza { public final synchronized void start(C config) { if (!disposableReference.compareAndSet(EMPTY, STARTING) && !disposableReference.get().isDisposed()) { throw new UnsupportedOperationException("Cannot start Stanza that is already starting/started"); } disposableReference.set(startDisposable(config)); }  final synchronized void start(C config); final synchronized void stop();  }### Answer:
@Test(expected = UnsupportedOperationException.class) public void startedStanzaCanNotBeStartedAgain() { Stanza<StanzaConfig> stanza = new SimpleStanza(count -> {}); try { stanza.start(() -> "name"); } catch (Exception e) { fail("Should be able to successfully start Stanza on first call"); } stanza.start(() -> "name"); }