How to get a handle to a new Object while unit testing?
<p>How would I test this ValueObject created on the fly in SomeClass without stubbing it out using PowerMock etc?</p>

<pre><code>class ValueOBject {
    private String x, y;
    getters
    setters
}
class SomeClass {
    public void  foo () {
       ValueObject vo = new ValueObject();
       vo.setX("some string 1");
       vo.setY("some string 2");

       faa(vo);
    }

    public void faa(ValueObject vo) {
        // do some more logic on vo here
    }
}


class SomeClassTest extends TestCase{
   public void testFoo() {
       SomeClass s = new SomeClass();
       s.foo();
       // HOW TO DO THIS?
       verify(faa(VAlueObject that is created during foo's run));
   }
}
</code></pre>

<p>I dont want to use PowerMockito  or similar libraries to return a MOCKED object!
Rather a REAL object thats created during execution of the method foo() :</p>

<pre><code>//    DONT WANT A MOCKED OBJECT
//    @Mock
//    private ValueOBject vo;
//     henNew(GetEmailInformation.class).withNoArguments().thenReturn(getEmailInformation);
</code></pre>
