@Test(expected = RecordNotFoundException.class)
public void deleteDetectorMapping_illegal_args() throws Exception {

    val deleteResponse = mockDeleteResponse("1");
    Mockito.when(legacyElasticSearchClient.delete(any(DeleteRequest.class), eq(RequestOptions.DEFAULT))).thenReturn(deleteResponse);
    Mockito.when(deleteResponse.getResult()).thenReturn(DocWriteResponse.Result.NOT_FOUND);
    Mockito.when(elasticsearchUtil.checkNullResponse(deleteResponse.getResult())).thenReturn(true);
    repoUnderTest.deleteDetectorMapping("1");
}