@Test
public void shouldForwardCallsToMockForMatchingAlternativeNames() throws CertificateException {

    when(topOfChain.getSubjectX500Principal())
            .thenReturn(new X500Principal("CN=example.com, OU=Smarthome, O=Eclipse, C=DE"));
    when(topOfChain.getSubjectAlternativeNames())
            .thenReturn(constructAlternativeNames("example1.com", "example.org"));
    subject.checkClientTrusted(chain, "just");
    verify(trustmanager).checkClientTrusted(chain, "just", (Socket) null);
    verifyNoMoreInteractions(trustmanager);
}