@Test(expected = RuntimeException.class)
public void trustDetectorFail() throws IOException {

    Mockito.when(legacyElasticSearchClient.update(any(UpdateRequest.class), any(RequestOptions.class))).thenThrow(new IOException());
    repoUnderTest.trustDetector("aeb4d849-847a-45c0-8312-dc0fcf22b639", true);
}