Then depending on what service the "service object" provides and how the container's callbacks initialize your service, you may want to create a mock object of the service instance, with all the functionality/initialization without the containers APIs. Let's say you hard-code some service constants/provide some default objects/resources.
Generally Junit is not a framework for mocking container based services(there are a few Xunit f/w's for that). However depending on what service object you are looking up, you may be able to create a custom mock of it, except of-course when the service is doing some sort of marshalling, caching, etc. in which case refactor your design to test the lookup client's own behaviour not the services behaviour(The services unit testcase will take care of that).
Java Pal - Your friend in technology and innovation...India.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com