This is in accordance with the remote interface that you use between your context and the service (in the remote call script). For example, you can do the following:
IBinder service = this.bindService(new Intent(TestService.class.getName()));
assertNotNull(service);
assertTrue(service instanceof ITestServiceCall);
ITestServiceCall iTestServiceCall = ITestServiceCall.Stub.asInterface(service);
assertNotNull(iTestServiceCall);
iTestServiceCall.doSomething();
ITestServiceCall is the interface that you define in the AIDL file ( ITestServiceCall.aidl ).
But before this can work, you must ensure that your service correctly returns the Stub of your interface to onBind () .
Hope this helps.