What you need in your test is to get your hand on a instance of
AttachmentResource1_10. For the sake of that test you should just be able to do a:
AttachmentResource1_10 res = new AttachmentResource1_10();
Then, you want to invoke
res.search(as, patient, visit, encounter, includeEncounterless, includeVoided)
with, for each test method, the parameters either mocked or set in a way that will trigger a certain call on
As you can see, you have missed one parameter to the search method. It should also take the service as a parameter, that’s precisely in order to spy on it for eventually verifying that the appropriate methods where called.