@Test
public void rejectIllFormedClientCertificate() {

    final Connection connection = createConnection(CONNECTION_ID).toBuilder()
            .credentials(ClientCertificateCredentials.newBuilder()
                    .clientKey(Certificates.CLIENT_KEY)
                    .clientCertificate("Wurst")
                    .build())
            .build();
    final ConnectionValidator underTest = getConnectionValidator();
    assertThatExceptionOfType(ConnectionConfigurationInvalidException.class)
            .isThrownBy(() -> underTest.validate(connection, DittoHeaders.empty(), actorSystem));
}