$apply test