Set boundary functions and tests