TECHNICALFACILITATION.COM - THE ULTIMATE WEBSPHERE AND JAVA CERTIFICATION GUIDES AND RESOURCES
Google
Download the Completed Solution: 04JavaBeanJUnit.ear. I think this ear file includes the JUnit solution as well.

The junit.jar file must be on your classpath for you to bring this ear file in and have the JUnit tests compile - just so you know.

Scroll to the bottom of the page for pertinent code snippets.

Creating Serializable JavaBeans

This free, multimedia tutorial shows you how to use IBM's Rational Application Developer (IRAD) 6.0 to create a simple, yet somewhat salacious, JavaBean.

If you found something helpful here, please do your part and help support the site. Link to us, buy some books, support our sponsors, tell your developer friends about us, and remember: Happy Java!

package com.examscam.common;

public class Timer implements java.io.Serializable {

private long startTime;

public Timer(){}
public void start() {
startTime = System.currentTimeMillis();
}
public long getStartTime() {
return startTime;
}
public long getElapsedTime() {
return System.currentTimeMillis() - startTime;
}
public void reset() {
startTime = System.currentTimeMillis();
}
}

Google
THE ULTIMATE CERTIFICATION AND WEBSPHERE RESOURCES - BUY THEM NOW ON AMAZON
eXTReMe Tracker