@Test(expected = RecordNotFoundException.class)
public void updateDetector_illegal_args() {

    val updateResponse = mock(UpdateResponse.class);
    val result = updateResponse.getResult();
    val mom = ObjectMother.instance();
    val document = mom.buildDetectorDocument();
    document.setUuid(UUID.randomUUID());
    Mockito.when(result).thenReturn(DocWriteResponse.Result.NOT_FOUND);
    Mockito.when(elasticsearchUtil.checkNullResponse(result)).thenReturn(true);
    repoUnderTest.updateDetector("aeb4d849-847a-45c0-8312-dc0fcf22b639", document);
}