Java Function Tests