Update for Java Tests, refator of dynamic code