@Override
  public <T> T Spy(Class<T> type) {
    return createMock(inferNameFromType(type), type, MockNature.SPY, Collections.<String, Object>emptyMap());
  }
@ Override public < T > T Spy ( Class < T > type ) { return createMock ( inferNameFromType ( type ) , type , MockNature . SPY , Collections . < String , Object > emptyMap ( ) ) ; }
Creates a spy with the specified type. The mock name will be the types simple name.

Example:

<pre>
def person = Spy(Person) // type is Person.class, name is "person"
</pre>

@param type the class type of the spy
@param <T> the class type of the spy

@return a spy with the specified type