### Question:
BaseServiceInfoProvider extends ContentProvider { public final void notifyServiceInfoChange() { notifyServiceInfoChange(getContext(), serviceInfoChangeBroadcast); } protected  BaseServiceInfoProvider(String serviceInfoChangeBroadcast); int delete(Uri uri, String selection, String[] selectionArgs); String getType(Uri uri); Uri insert(Uri uri, ContentValues values); boolean onCreate(); Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder); int update(Uri uri, ContentValues values, String selection, String[] selectionArgs); @Override final Bundle call(String method, String arg, Bundle extras); final void notifyServiceInfoChange(); static void notifyServiceInfoChange(Context context, String configChangeBroadcast); static final String SERVICE_INFO_KEY; static final String SERVICE_INFO_ERROR_KEY; static final String SERVICE_INFO_ERROR_DESC_KEY; static final String SERVICE_INFO_ERROR_HANDLED_KEY; static final String METHOD_GET_SERVICE_INFO; static final String METHOD_PROVIDE_ERROR; }### Answer:
@Test public void shouldSendCorrectBroadcastForServiceInfoChange() throws Exception { TestServiceInfoProvider serviceInfoProvider = new TestServiceInfoProvider("my.broadcast"); serviceInfoProvider.notifyServiceInfoChange(); ArgumentCaptor<Intent> broadcastCaptor = ArgumentCaptor.forClass(Intent.class); verify(context).sendBroadcast(broadcastCaptor.capture()); assertThat(broadcastCaptor.getValue().getAction()).isEqualTo("my.broadcast"); assertThat(broadcastCaptor.getValue().getData().toString()).isEqualTo("package:com.test"); }