@Test
public void doesNotAllowDoubleConnections() throws Exception {

    graphite.connect();
    try {
        graphite.connect();
        failBecauseExceptionWasNotThrown(IllegalStateException.class);
    } catch (IllegalStateException e) {
        assertThat(e.getMessage())
                .isEqualTo("Already connected");
    }
}