Fix ClassLoader problems and add tests.
Ignore generated class.