Add beaker testing and fix 2 race conditions

Adding beaker tests which allow us to do actual system testing.
With testing i found 2 race conditions.

1. Sometimes the configfile define would be executed after collecting all the config parts.
2. When using an external source for the package ( not the repo ) we need to install java before installing the package.