edited passTransaction for junit testing