You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by mm...@apache.org on 2005/05/15 05:23:25 UTC

svn commit: r170192 - /incubator/beehive/trunk/samples/controls-webservices-blank /incubator/beehive/trunk/samples/controls-webservices-blank/junit/test /incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator /incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc /incubator/beehive/trunk/system-controls/test/src/webservice /incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit /incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice

Author: mmerz
Date: Sat May 14 20:23:24 2005
New Revision: 170192

URL: http://svn.apache.org/viewcvs?rev=170192&view=rev
Log:
Fixed service controls's resource loading issues
modfied the controlunit to use contextbean for its resource loading
updated the controls-webservices-blank to run the junit tests

Contributor: Daryoush Mehrtash


Modified:
    incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
    incubator/beehive/trunk/samples/controls-webservices-blank/build.xml
    incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
    incubator/beehive/trunk/system-controls/test/src/webservice/build.xml
    incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java
    incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java

Modified: incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml (original)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml Sat May 14 20:23:24 2005
@@ -125,7 +125,7 @@
 			<arg line="-gen_root ${gen.source.dir} 
 		      	-wsdl ${schema.dir}
 		      	-pkg ${my.service.control.package}
-		      	-wsdl_path_annotation ." />
+		      	-wsdl_path_annotation ${my.service.control.package}" />
 		</java>
 
 		<!-- have the wsdls, in the same dir as the jcx files -->

Modified: incubator/beehive/trunk/samples/controls-webservices-blank/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/build.xml?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/build.xml (original)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/build.xml Sat May 14 20:23:24 2005
@@ -118,7 +118,7 @@
 			<arg line="-gen_root ${gen.source.dir} 
 		      	-wsdl ${schema.dir}
 		      	-pkg ${my.service.control.package}
-		      	-wsdl_path_annotation ." />
+		      	-wsdl_path_annotation ${my.service.control.package}" />
 		</java>
 
 		<!-- have the wsdls, in the same dir as the jcx files -->

Modified: incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java (original)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java Sat May 14 20:23:24 2005
@@ -1,104 +1,151 @@
-/*
- * 
- * Copyright 2004-2005 BEA Systems, Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- * 
- * Original author: Daryoush Mehrtash
- */
-
-package test;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import mypackage.EnhancedAddressBook;
-import junit.framework.TestCase;
-import org.apache.beehive.enhancedaddressbook.Address;
-import org.apache.beehive.enhancedaddressbook.Phone;
-import org.apache.beehive.enhancedaddressbook.StateType;
-import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.context.ControlBeanContext;
-import org.apache.beehive.controls.api.context.ControlContainerContext;
-import org.apache.beehive.controls.api.context.ControlThreadContext;
-
-
-
-public class AddressBookTest extends TestCase {
-   @Control EnhancedAddressBook client;
-
-
-
-    public void testGetAddressFromName() throws Exception {
-		Address address = Address.Factory.newInstance();
-		address.setStreetName("Open Source Way");
-		address.setCity("Seattle");
-		address.setZip(98119);
-		Phone phone = Phone.Factory.newInstance();
-		phone.setAreaCode(206);
-		phone.setNumber("111-2222");
-		address.setPhoneNumber(phone);
-		StateType state = StateType.Factory.newInstance();
-		state.setState("WA");
-		address.setState(state);
-		client.addEntry("apache", address);
-		
-		// retrieve the address
-		Address response = client.getAddressFromName("apache");
-		assertTrue(response.getStreetName().equals("Open Source Way"));
-		//  more assertions here..
-		
-		
-    }
-
-	
-	
-	private ControlContainerContext mContext;
-	public void setUp() throws Exception {
-	    try { 
-	    mContext = ControlThreadContext.getContext();
-	    if(mContext == null) {
-	        mContext = new org.apache.beehive.controls.runtime.bean.
-	            ControlContainerContext();
-	        mContext.beginContext();
-	    }
-
-	    /*
-	     * Now that the context is in place, try to initialize the service
-	     * control client subclass.
-	     */
-	    Class cls = getClass();
-	    Class clientInitializer =
-	        cls.getClassLoader().loadClass(cls.getName()
-	                                       + "ClientInitializer");
-	    
-	    Method init =
-	        clientInitializer.getMethod("initialize",
-	                                    ControlBeanContext.class, cls);
-	    init.invoke(null, mContext, this);
-	    } catch ( InvocationTargetException ite) {
-	        Throwable t = ite.getCause();
-	        System.out.println("Error in method invocation original cause: " + t.getMessage());
-	        t.printStackTrace();
-	        ite.printStackTrace();
-	        throw ite;
-	    }catch (Exception e) {
-	        e.printStackTrace();
-	        throw e;
-	    }
-
-	}
-
-
-}
+/*
+ * 
+ * Copyright 2004 BEA Systems, Inc.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * 
+ * Original author: Daryoush Mehrtash
+ */
+package test;
+
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.beans.beancontext.BeanContextServices;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Iterator;
+
+import mypackage.EnhancedAddressBook;
+import junit.framework.TestCase;
+import org.apache.beehive.enhancedaddressbook.Address;
+import org.apache.beehive.enhancedaddressbook.Phone;
+import org.apache.beehive.enhancedaddressbook.StateType;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.context.ControlContainerContext;
+import org.apache.beehive.controls.api.context.ControlThreadContext;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+
+public class AddressBookTest extends TestCase {
+	@Control
+	public EnhancedAddressBook client;
+
+	public void testGetAddressFromName() throws Exception {
+		Address address = Address.Factory.newInstance();
+		address.setStreetName("Open Source Way");
+		address.setCity("Seattle");
+		address.setZip(98119);
+		Phone phone = Phone.Factory.newInstance();
+		phone.setAreaCode(206);
+		phone.setNumber("111-2222");
+		address.setPhoneNumber(phone);
+		StateType state = StateType.Factory.newInstance();
+		state.setState("WA");
+		address.setState(state);
+		client.addEntry("apache", address);
+
+		// retrieve the address
+		Address response = client.getAddressFromName("apache");
+		assertTrue(response.getStreetName().equals("Open Source Way"));
+		// more assertions here..
+
+	}
+
+	
+	
+	//   Initialization of the Controls.  
+	JunitTestBeanContext beanContext = new JunitTestBeanContext();
+	public void setUp() throws Exception {
+
+		try {
+			beanContext.beginContext();
+			initializeControls(this);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	public void tearDown() {
+		beanContext.endContext();
+	}
+	
+	private void initializeControls(Object obj) throws Exception {
+		Class cls = obj.getClass();
+		// search for fields with @Control annotations
+		for (Field field : cls.getFields()) {
+			if (null != field.getAnnotation(Control.class)) {
+
+				// attempt to load using client initializer.
+				ControlContainerContext ccc = ControlThreadContext.getContext();
+				if (null == ccc) {
+					throw new Exception("no control container context found");
+				}
+				Class clientInitializer = cls.getClassLoader().loadClass(
+						cls.getName() + "ClientInitializer");
+				Method init = clientInitializer.getMethod("initialize",
+						ControlBeanContext.class, cls);
+				init.invoke(null, ccc, obj);
+				break;
+			}
+		}
+	}
+}
+
+class JunitTestBeanContext extends
+		org.apache.beehive.controls.runtime.bean.ControlContainerContext {
+
+	private static final long serialVersionUID = 1L;
+
+	public JunitTestBeanContext() {
+		super();
+	}
+
+	public InputStream getResourceAsStream(String name, BeanContextChild bcc)
+			throws IllegalArgumentException {
+		return null;  // not sure why this works!
+	}
+
+	public void initialize() {
+		super.initialize();
+		addService(JUnitServiceProvider.class, new JUnitServiceProvider());
+	}
+}
+
+class JUnitServiceProvider implements BeanContextServiceProvider {
+
+	public InputStream getResourceAsStream(String name)
+			throws IllegalArgumentException {
+		return null;
+	}
+
+
+	public Object getService(BeanContextServices arg0, Object arg1, Class arg2,
+			Object arg3) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void releaseService(BeanContextServices arg0, Object arg1,
+			Object arg2) {
+
+	}
+
+	public Iterator getCurrentServiceSelectors(BeanContextServices arg0,
+			Class arg1) {
+		return null;
+	}
+
+}

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java Sat May 14 20:23:24 2005
@@ -334,7 +334,7 @@
         if (wsdlPathAnnotation != null) {
             setWSDLPath(wsdlPathAnnotation + "/" + wsdlFile.getName());
         } else {
-            setWSDLPath(wsdlFile.getCanonicalPath());
+            setWSDLPath(wsdlFile.getName());
 
         }
         // get additional wsdl information

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs Sat May 14 20:23:24 2005
@@ -510,16 +510,20 @@
 				url = new URL(pathToWSDL);
 				wsdlStream = url.openStream();
 			} else { // it is a local file name
-
-				ServletContext servletContext = cbContext.getService(
-						ServletContext.class, null);
-				if (servletContext != null) {
-					wsdlStream = servletContext.getResourceAsStream(pathToWSDL);
-				} else {
-					wsdlStream = cbContext.getControlInterface()
-							.getResourceAsStream(pathToWSDL);
-				}
 				
+				wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
+
+//				ServletContext servletContext = cbContext.getService(
+//						ServletContext.class, null);
+//				if (servletContext != null) {
+//					wsdlStream = servletContext.getResourceAsStream(pathToWSDL);
+//				} else {
+//				}
+//				
+//				if (wsdlStream == null) {
+//					wsdlStream = cbContext.getControlInterface()
+//					.getResourceAsStream(pathToWSDL);
+//				}
 
 				if (wsdlStream == null) {
 					wsdlStream = this.getClass().getClassLoader().getResourceAsStream(pathToWSDL);
@@ -537,7 +541,7 @@
 			logger.error("ERROR: WSDL File not found: " + f.getCanonicalPath());
 			throw e;
 		} catch (IOException e) {
-			logger.error("ERROR: IO Exception in reading WSDL File: " + f.getCanonicalPath());
+			logger.error("ERROR: IO Exception in reading WSDL File" );
 			throw e;
 		}
 	}

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/build.xml?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/build.xml (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/build.xml Sat May 14 20:23:24 2005
@@ -183,8 +183,8 @@
             </classpath>
 	    <arg line="-gen_root ${testmodel.client.jcxgen.dir}	
                        -wsdl ${schemas.dir} 
-                       -pkg ${testmodel.client.jcxgen.packageName} 
-                       -wsdl_path_annotation ."/>
+                       -pkg ${testmodel.client.jcxgen.packageName} "/>
+                       <!-- -wsdl_path_annotation  ${testmodel.client.jcxgen.packageName}"/>  not needed for the junit find the wsdl relativce to the jcx file. -->
         </java>
 	  	
 	<copy todir="${testmodel.client.jcxgen.dir}/${testmodel.client.jcxgen.packageName}">

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/controlunit/ControlTestCase.java Sat May 14 20:23:24 2005
@@ -22,62 +22,116 @@
  */
 
 
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.beans.beancontext.BeanContextServices;
+import java.io.InputStream;
+import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.Iterator;
 
 import junit.framework.TestCase;
 
+import org.apache.beehive.controls.api.bean.Control;
 import org.apache.beehive.controls.api.context.ControlBeanContext;
 import org.apache.beehive.controls.api.context.ControlContainerContext;
 import org.apache.beehive.controls.api.context.ControlThreadContext;
 
-/*******************************************************************************
- * 
- *
- * @author Jonathan Colwell
- */
-public abstract class ControlTestCase extends TestCase {
 
-    private ControlContainerContext mContext;
+public abstract class ControlTestCase extends TestCase {
 
-    public void setUp() throws Exception {
-        try { 
-        mContext = ControlThreadContext.getContext();
-        if(mContext == null) {
-            mContext = new org.apache.beehive.controls.runtime.bean.
-                ControlContainerContext();
-            mContext.beginContext();
-        }
-
-        /*
-         * Now that the context is in place, try to initialize the service
-         * control client subclass.
-         */
-        Class cls = getClass();
-        Class clientInitializer =
-            cls.getClassLoader().loadClass(cls.getName()
-                                           + "ClientInitializer");
-        
-        Method init =
-            clientInitializer.getMethod("initialize",
-                                        ControlBeanContext.class, cls);
-        init.invoke(null, mContext, this);
-        } catch ( InvocationTargetException ite) {
-            Throwable t = ite.getCause();
-            System.out.println("Error in method invocation original cause: " + t.getMessage());
-            t.printStackTrace();
-            ite.printStackTrace();
-            throw ite;
-        }catch (Exception e) {
-            e.printStackTrace();
-            throw e;
-        }
-        
-    }
-
-    public void tearDown() throws Exception {
-        if(mContext != null) {
-            mContext.endContext();
-        }
-    }
+	
+	protected void setMyControlObject(Object obj) {
+		beanContext.setBaseObjectToLoadFrom(obj);
+	}
+	public void setUp() throws Exception {
+
+		try {
+			beanContext.beginContext();
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	public void tearDown() {
+		beanContext.endContext();
+	}
+	
+	protected void initializeControls(Object obj) throws Exception {
+		Class cls = obj.getClass();
+		// search for fields with @Control annotations
+		for (Field field : cls.getFields()) {
+			if (null != field.getAnnotation(Control.class)) {
+
+				// attempt to load using client initializer.
+				ControlContainerContext ccc = ControlThreadContext.getContext();
+				if (null == ccc) {
+					throw new Exception("no control container context found");
+				}
+				Class clientInitializer = cls.getClassLoader().loadClass(
+						cls.getName() + "ClientInitializer");
+				Method init = clientInitializer.getMethod("initialize",
+						ControlBeanContext.class, cls);
+				init.invoke(null, ccc, obj);
+				break;
+			}
+		}
+	}
+
+
+
+	
+	protected JunitTestBeanContext beanContext = new JunitTestBeanContext();
+
+}
+
+class JunitTestBeanContext extends
+		org.apache.beehive.controls.runtime.bean.ControlContainerContext {
+
+	private static final long serialVersionUID = 1L;
+	Object obj;  // used to find the resources 
+	
+
+
+	public void setBaseObjectToLoadFrom(Object obj) {
+		this.obj=obj;
+	}
+	public InputStream getResourceAsStream(String name, BeanContextChild bcc)
+			throws IllegalArgumentException {
+
+			InputStream is = obj.getClass().getResourceAsStream(name);
+			return is;
+
+	}
+
+	public void initialize() {
+		super.initialize();
+		addService(JUnitServiceProvider.class, new JUnitServiceProvider());
+	}
+}
+
+class JUnitServiceProvider implements BeanContextServiceProvider {
+
+	public InputStream getResourceAsStream(String name)
+			throws IllegalArgumentException {
+		return null;
+	}
+
+
+	public Object getService(BeanContextServices arg0, Object arg1, Class arg2,
+			Object arg3) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void releaseService(BeanContextServices arg0, Object arg1,
+			Object arg2) {
+
+	}
+
+	public Iterator getCurrentServiceSelectors(BeanContextServices arg0,
+			Class arg1) {
+		return null;
+	}
 }

Modified: incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java?rev=170192&r1=170191&r2=170192&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/webservice/tests/org/controlhaus/webservice/SimpleWebSericeTest.java Sat May 14 20:23:24 2005
@@ -29,48 +29,50 @@
 import org.apache.log4j.Logger;
 import org.controlhaus.controlunit.ControlTestCase;
 import org.controlhaus.webservice.testmodel.client.*;
+
+
+
+import java.beans.beancontext.BeanContextChild;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.beans.beancontext.BeanContextServices;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Iterator;
+
+import junit.framework.TestCase;
 import org.apache.beehive.controls.api.bean.Control;
 import org.apache.beehive.controls.api.context.ControlContainerContext;
 import org.apache.beehive.controls.api.context.ControlThreadContext;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+
 
 public class SimpleWebSericeTest extends ControlTestCase {
 	static Logger logger = Logger.getLogger(SimpleWebSericeTest.class);
 
-	@Control SimpleWSClient client;
-//	@Control SimpleWSClientXMLBeansType xmlbeanTypeClient;
-	
-	
-	   public void setUp() throws Exception  {
-	   		super.setUp();   // initialize my control instance.... 
-	   		
-	   		// TODO:  The local Axis server is not working.... 
-//	   		LocalAxisServiceFacotry.registerAsServiceFactory();
-//	   		LocalAxisServiceFacotry.setWebServiceProvider(SimpleWebService.class);
-	   }
-	   
-//	   public void testFactoryInstantiation() throws ServiceException {
-//        ServiceFactory factory = ServiceFactory.newInstance();
-//        System.out.println("Service factory class: " + factory);
-//        assertTrue(factory.getClass().equals(LocalAxisServiceFacotry.class));
-//        
-//	   }
+	@Control public SimpleWSClient client;
+
 	   public void testSimpleInvoke() throws Exception {
+		   System.out.println("In method control is: " + client);
 	   		ClientAddress res = client.getAddressFromName("Jack");
 	        logger.debug("Jack... city: " + res.getCity() + " zipcode: " + res.getZip() + " street: " + res.getStreetName());
 	   		assertTrue("Result address is not as expected!:  Result: " +res.getCity() + " Expected: " + "Seattle", 0 == "Seattle".compareTo(res.getCity()));
 	   		assertTrue("Result zipcode is not as expected!:  Result: " +res.getZip() + " Expected: " + "98119", 98119 == res.getZip());	   		
 	   }
-	   
-	   
-	   // TODO: Holders are not working yet,..... enable this test after the code is in place
-//	   public void testHolder() throws Exception {
-//	   	StringHolder data = new StringHolder();
-//	   	data.value = "Ja";
-//   		int res = client.FindClosestName(data);
-//   		System.out.println("Result: " + res + "data + " + data.value);
-//   		assertTrue(res == 1);
-//   		assertTrue(0 == data.value.compareTo("Jack"));
-//    }
 
 
-}
+		
+		public void setUp() throws Exception {
+
+			try {
+				super.setUp();
+				initializeControls(this);
+				setMyControlObject(client);
+
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+}
\ No newline at end of file