@Test
public void setFieldIntoObjectTest() throws Exception {

    HostResources host = new HostResources();
    String expectedName = "name";
    spy.setFieldIntoObject(host, "hostName", expectedName);
    Mockito.verify(spy).getDeclaredField(Mockito.any(), Mockito.anyString());
    Assert.assertEquals(expectedName, host.getHostName());
}