moving example class to unit test.
added junit dependency.
fixed NPE when calling setValue(null)
code cleanup.