encapsulate test using loan pattern