@Test
public void testNotifyAgent() throws Exception
{

    WebClient webClient = mock( WebClient.class );
    Response response = mock( Response.class );
    doReturn( "IP" ).when( resourceHostInfo ).getAddress();
    doReturn( webClient ).when( commandProcessor ).getWebClient( resourceHostInfo );
    doReturn( response ).when( webClient ).form( any( Form.class ) );
    doReturn( Response.Status.ACCEPTED.getStatusCode() ).when( response ).getStatus();
    commandProcessor.notifyAgent( resourceHostInfo );
    verify( hostRegistry ).updateResourceHostEntryTimestamp( HOST_ID );
}