@Test(expected = UncheckedIOException.class)
public void loadTrustAnchor_test() throws IOException {

    CertFileResourcesTrustAnchorsProvider trustAnchorProvider = new CertFileResourcesTrustAnchorsProvider();
    Resource resource = mock(Resource.class);
    when(resource.getInputStream()).thenThrow(IOException.class);
    trustAnchorProvider.loadTrustAnchor(resource);
}