Fixed issue with dependency on internal classes and enums defined in java sources.  Added some tests.