/**
* Test that the value for the {bar} property returned by the <code>getFooBar</code>
* method matches the expected value parsed from the WSDL.
*/
public void testGetFooBar() {
Binding binding = null;
FooBindingExtensions exts = null;
binding = fBindings[0];
exts = (FooBindingExtensions)binding
.getComponentExtensionContext(FooConstants.NS_URI_FOO);
assertNotNull("The Binding '" + binding.getName() + "' does not contain an FooBindingExtensions object.",
exts);
Integer actual = exts.getFooBar();
assertEquals("Unexpected number of errors", 1, testErrorHandler.numErrors);
assertEquals("Unexpected error key", "Errors: FOO-001 \n", testErrorHandler.getSummaryOfMessageKeys());
binding = fBindings[1];
exts = (FooBindingExtensions)binding
.getComponentExtensionContext(FooConstants.NS_URI_FOO);
assertNotNull("The Binding '" + binding.getName() + "' does not contain an FooBindingExtensions object.",
exts);
actual = exts.getFooBar();
assertNotNull("The value for bar was null", actual);
assertEquals("Unexpected value for bar.", 3, actual.intValue());