String propKey1 = "AddNumbersLogicalHandlerInboundAppScopedProperty";
String propKey2 = "AddNumbersLogicalHandlerInboundHandlerScopedProperty";
String value = (String)mc.get(propKey1);
if (value == null)
throw new RuntimeException("Property value for key \"" + propKey1 + "\" was null, but is APPLICATION scoped and should be accessible by the endpoint");
if (mc.containsKey(propKey2)) // instead of "get", use "containsKey" to be a little more robust in testing
throw new RuntimeException("MessageContext.containsKey reported true for key \"" + propKey2 + "\" was not null. This property is HANDLER scoped and should not be accessible by the endpoint");
TestLogger.logger
.debug(">> Received addNumbersHandler request for " + arg0 + " and " + arg1);
if (arg0 == 101)
throw new RuntimeException("Got value 101. AddNumbersHandlerPortTypeImpl.addNumbersHandler method is correctly throwing this exception as part of testing");