/**
* Creates a mock object of type <var>typeToMock</var> with the given name.
*/
public <T> T mock(Class<T> typeToMock, String name) {
MockObject mock = new MockObject(name);
ProxiedObjectIdentity invokable =
new ProxiedObjectIdentity(
new InvocationDiverter<CaptureControl>(
CaptureControl.class, mock, mock));
return imposteriser.imposterise(invokable, typeToMock, CaptureControl.class);
}