Adapted App.java into a test case.

The sample app also makes for a nice sample test case.
Merge pull request #1 from DrDub/master

Adapted App.java into a test case.