}
public void testGetSetMessageContext() {
WebServiceContextImpl wsci = new WebServiceContextImpl();
assertNull(wsci.getMessageContext());
final MessageContext ctx = new GenericMessageContext();
WebServiceContextImpl.setMessageContext(ctx);
assertSame(ctx, wsci.getMessageContext());
Thread t = new Thread() {
public void run() {
WebServiceContextImpl threadLocalWSCI = new WebServiceContextImpl();
assertNull(threadLocalWSCI.getMessageContext());
MessageContext threadLocalCtx = new GenericMessageContext();
WebServiceContextImpl.setMessageContext(threadLocalCtx);
assertSame(threadLocalCtx, threadLocalWSCI.getMessageContext());
assertTrue(ctx != threadLocalWSCI.getMessageContext());
}
};
t.start();