MainFragment extends BrowseFragment implements
        LoaderManager.LoaderCallbacks<HashMap<String, List<Song>>>, OnPlaylistLoaded { protected void loadPlaylistData() { PlaylistProvider.setContext(getActivity()); getLoaderManager().initLoader(0, null, this); }  @Override void onActivityCreated(Bundle savedInstanceState); @Override Loader<HashMap<String, List<Song>>> onCreateLoader(int arg0, Bundle arg1); @Override void onLoadFinished(Loader<HashMap<String, List<Song>>> arg0,
            HashMap<String, List<Song>> data); @Override void onLoaderReset(Loader<HashMap<String, List<Song>>> arg0); @Override void onPlaylistLoaded(PlaylistSimple playlist, final int currentNumber, final int totalNumber); ArrayObjectAdapter getAdapter(); void setArrayObjectAdapter(ArrayObjectAdapter adapter);  }
@Test public void test_loadPlaylistData() { LoaderManager manager = Mockito.mock(LoaderManager.class); doReturn(manager).when(fragment).getLoaderManager(); fragment.loadPlaylistData(); assertNotNull(PlaylistProvider.getContext()); verify(manager).initLoader(0, null, fragment); }