docu and bug fix in junit tests