EnvelopeSenderSelector { public EnvelopeSender getEnvelopeSender() { if (suspended.get()) { return shutteringStoreSender; } return jmsSender; }  EnvelopeSender getEnvelopeSender(); void setSuspended(final boolean shuttered);  }
@Test public void shouldGetTheJmsSenderByDefault() throws Exception { assertThat(envelopeSenderSelector.getEnvelopeSender(), is(jmsSender)); }