@Test
public void deleteDetectorMapping_successful() throws Exception {

    val id = "adsvade8^szx";
    DeleteResponse deleteResponse = mockDeleteResponse(id);
    when(legacyElasticSearchClient.delete(any(DeleteRequest.class), eq(RequestOptions.DEFAULT))).thenReturn(new DeleteResponse());
    repoUnderTest.deleteDetectorMapping(id);
    verify(legacyElasticSearchClient, atLeastOnce()).delete(any(DeleteRequest.class), eq(RequestOptions.DEFAULT));
    assertEquals(id, deleteResponse.getId());
    assertEquals(elasticSearchProperties.getIndexName(), deleteResponse.getIndex());
    assertEquals("DELETED", deleteResponse.getResult().toString());
}