sf.setServiceClass(Customer.class);
sf.setApplication(app);
sf.setStart(false);
Server server = sf.create();
ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
assertNotNull(proxy);
ClassResourceInfo cri = sf.getServiceFactory().getClassResourceInfo().get(0);
Customer customer = (Customer)cri.getResourceProvider().getInstance(
new MessageImpl());
assertNull(customer.getApplication1());
assertNull(customer.getApplication2());
invokeCustomerMethod(cri, customer, server);
assertSame(app, customer.getApplication1());
assertSame(app, customer.getApplication2());
assertTrue(proxy.get() instanceof UriInfo);
}