public class JavaReferenceWireTestCase extends TestCase {
public void testReferenceSet() throws Exception {
ScopeContainer scope = createMock();
scope.start();
final Target target = new TargetImpl();
PojoConfiguration configuration = new PojoConfiguration();
configuration.addReferenceSite("target", SourceImpl.class.getMethod("setTarget", Target.class));
configuration.addServiceInterface(Source.class);
Constructor<SourceImpl> ctr = SourceImpl.class.getConstructor();
configuration.setInstanceFactory(new PojoObjectFactory<SourceImpl>(ctr));