@Test
  public void testClientSocketFactory() throws Exception {
    assertThatThrownBy(() -> socket = SocketCreatorFactory
        .getSocketCreatorForComponent(CLUSTER).forClient()
        .connect(new HostAndPort("localhost", 12345), 0))
            .isExactlyInstanceOf(IOException.class).hasMessage(EXCEPTION_MESSAGE);

    assertThat(invokedCreateSocket).isTrue();
  }
Integration tests for ClientSocketFactory.

<p>
Extracted from {@code JSSESocketJUnitTest}.
geode-core/src/integrationTest/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java