@Test
public void shouldNotForwardCallsToMockForDifferentCN() throws CertificateException, IllegalAccessException,
        NoSuchFieldException, SecurityException, IllegalArgumentException {

    writeField(subject, "defaultTrustManager", defaultTrustManager, true);
    mockSubjectForCertificate(topOfChain, "CN=example.com, OU=Smarthome, O=Eclipse, C=DE");
    mockIssuerForCertificate(topOfChain, "CN=Eclipse, OU=Smarthome, O=Eclipse, C=DE");
    mockSubjectForCertificate(bottomOfChain, "CN=Eclipse, OU=Smarthome, O=Eclipse, C=DE");
    mockIssuerForCertificate(bottomOfChain, "");
    when(topOfChain.getEncoded()).thenReturn(new byte[0]);
    subject.checkServerTrusted(chain, "just");
    verify(defaultTrustManager).checkServerTrusted(chain, "just", (Socket) null);
    verifyNoInteractions(trustmanager);
}