test_class.declarator: rxSchedulerTestRule = new RxSchedulerTestRule()
test_class.modifier: @Rule public final
test_class.original_string: @Rule public final RxSchedulerTestRule rxSchedulerTestRule = new RxSchedulerTestRule();
test_class.type: RxSchedulerTestRule
test_class.var_name: rxSchedulerTestRule
test_class.declarator: mockedDataProvider
test_class.modifier: @Mock
test_class.original_string: @Mock DataProvider mockedDataProvider;
test_class.type: DataProvider
test_class.var_name: mockedDataProvider
test_class.declarator: mockedView
test_class.modifier: @Mock
test_class.original_string: @Mock CollectionView mockedView;
test_class.type: CollectionView
test_class.var_name: mockedView
test_class.declarator: loadData = new ListDataTest(
        Arrays.asList(1, 2, 3),
        new PagingImpl(1, 2, 6))
test_class.original_string: ListData<Integer> loadData = new ListDataTest(
        Arrays.asList(1, 2, 3),
        new PagingImpl(1, 2, 6));
test_class.type: ListData<Integer>
test_class.var_name: loadData
test_class.declarator: loadMoreData = new ListDataTest(
        Arrays.asList(4, 5, 6),
        new PagingImpl(2, 2, 6))
test_class.original_string: ListData<Integer> loadMoreData = new ListDataTest(
        Arrays.asList(4, 5, 6),
        new PagingImpl(2, 2, 6));
test_class.type: ListData<Integer>
test_class.var_name: loadMoreData
test_class.declarator: refreshData = new ListDataTest(
        Arrays.asList(1, 2, 3, 4),
        new PagingImpl(1, 2, 6))
test_class.original_string: ListData<Integer> refreshData = new ListDataTest(
        Arrays.asList(1, 2, 3, 4),
        new PagingImpl(1, 2, 6));
test_class.type: ListData<Integer>
test_class.var_name: refreshData
test_class.declarator: tested
test_class.modifier: private
test_class.original_string: private CollectionViewPresenter tested;
test_class.type: CollectionViewPresenter
test_class.var_name: tested
test_class.file: collectionview/src/test/java/vn/tiki/collectionview/CollectionViewPresenterTest.java
test_class.identifier: CollectionViewPresenterTest
test_case.body: @Test
    public void testRefreshError() throws Exception {
      final Throwable exception = new Throwable();
      when(mockedDataProvider.fetchNewest()).thenReturn(Single.error(exception));
  
      tested.onRefresh();
      verify(mockedView).hideRefreshing();
    }
test_case.class_method_signature: CollectionViewPresenterTest.testRefreshError()
test_case.full_signature: @Test public void testRefreshError()
test_case.identifier: testRefreshError
test_case.invocations: thenReturn when fetchNewest error onRefresh hideRefreshing verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRefreshError()
focal_class.declarator: LOADING_ITEM = new LoadingItem()
focal_class.modifier: static final
focal_class.original_string: static final LoadingItem LOADING_ITEM = new LoadingItem();
focal_class.type: LoadingItem
focal_class.var_name: LOADING_ITEM
focal_class.declarator: collectionView
focal_class.original_string: CollectionView collectionView;
focal_class.type: CollectionView
focal_class.var_name: collectionView
focal_class.declarator: dataProvider
focal_class.modifier: @NonNull private final
focal_class.original_string: @NonNull private final DataProvider<?> dataProvider;
focal_class.type: DataProvider<?>
focal_class.var_name: dataProvider
focal_class.declarator: disposable
focal_class.modifier: @Nullable private
focal_class.original_string: @Nullable private Disposable disposable;
focal_class.type: Disposable
focal_class.var_name: disposable
focal_class.declarator: listData
focal_class.modifier: @Nullable private
focal_class.original_string: @Nullable private ListData<?> listData;
focal_class.type: ListData<?>
focal_class.var_name: listData
focal_class.file: collectionview/src/main/java/vn/tiki/collectionview/CollectionViewPresenter.java
focal_class.identifier: CollectionViewPresenter
focal_class.class_method_signature: CollectionViewPresenter.CollectionViewPresenter(@NonNull DataProvider<?> dataProvider)
focal_class.full_signature:   CollectionViewPresenter(@NonNull DataProvider<?> dataProvider)
focal_class.identifier: CollectionViewPresenter
focal_class.parameters: (@NonNull DataProvider<?> dataProvider)
focal_class.signature:  CollectionViewPresenter(@NonNull DataProvider<?> dataProvider)
focal_class.class_method_signature: CollectionViewPresenter.attach(CollectionView collectionView)
focal_class.full_signature:  void attach(CollectionView collectionView)
focal_class.identifier: attach
focal_class.parameters: (CollectionView collectionView)
focal_class.return: void
focal_class.signature: void attach(CollectionView collectionView)
focal_class.class_method_signature: CollectionViewPresenter.detach()
focal_class.full_signature:  void detach()
focal_class.identifier: detach
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void detach()
focal_class.class_method_signature: CollectionViewPresenter.onLoad()
focal_class.full_signature:  void onLoad()
focal_class.identifier: onLoad
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onLoad()
focal_class.class_method_signature: CollectionViewPresenter.onLoadMore()
focal_class.full_signature:  void onLoadMore()
focal_class.identifier: onLoadMore
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onLoadMore()
focal_class.class_method_signature: CollectionViewPresenter.onRefresh()
focal_class.full_signature:  void onRefresh()
focal_class.identifier: onRefresh
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onRefresh()
focal_class.class_method_signature: CollectionViewPresenter.disposeDisposable()
focal_class.full_signature: private void disposeDisposable()
focal_class.identifier: disposeDisposable
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void disposeDisposable()
focal_class.class_method_signature: CollectionViewPresenter.includeLoading()
focal_class.full_signature: @NonNull private Function<List<?>, List<?>> includeLoading()
focal_class.identifier: includeLoading
focal_class.modifiers: @NonNull private
focal_class.parameters: ()
focal_class.return: Function<List<?>, List<?>>
focal_class.signature: Function<List<?>, List<?>> includeLoading()
focal_class.class_method_signature: CollectionViewPresenter.isCurrentLastPage(@NonNull Paging paging)
focal_class.full_signature: private boolean isCurrentLastPage(@NonNull Paging paging)
focal_class.identifier: isCurrentLastPage
focal_class.modifiers: private
focal_class.parameters: (@NonNull Paging paging)
focal_class.return: boolean
focal_class.signature: boolean isCurrentLastPage(@NonNull Paging paging)
focal_class.class_method_signature: CollectionViewPresenter.map(Single<? extends ListData<?>> source)
focal_class.full_signature: private Single<List<?>> map(Single<? extends ListData<?>> source)
focal_class.identifier: map
focal_class.modifiers: private
focal_class.parameters: (Single<? extends ListData<?>> source)
focal_class.return: Single<List<?>>
focal_class.signature: Single<List<?>> map(Single<? extends ListData<?>> source)
focal_class.class_method_signature: CollectionViewPresenter.append(List<?> list1, Object item)
focal_class.full_signature: private static List<?> append(List<?> list1, Object item)
focal_class.identifier: append
focal_class.modifiers: private static
focal_class.parameters: (List<?> list1, Object item)
focal_class.return: List<?>
focal_class.signature: List<?> append(List<?> list1, Object item)
focal_class.class_method_signature: CollectionViewPresenter.concat(List<?> list1, List<?> list2)
focal_class.full_signature: private static List<?> concat(List<?> list1, List<?> list2)
focal_class.identifier: concat
focal_class.modifiers: private static
focal_class.parameters: (List<?> list1, List<?> list2)
focal_class.return: List<?>
focal_class.signature: List<?> concat(List<?> list1, List<?> list2)
focal_method.body: void onRefresh() {
      disposeDisposable();
      disposable = map(dataProvider.fetchNewest())
          .map(includeLoading())
          .subscribe(
              new Consumer<List<?>>() {
                @Override
                public void accept(List<?> items) throws Exception {
                  collectionView.hideRefreshing();
                  collectionView.setItems(items);
                }
              },
              new Consumer<Throwable>() {
                @Override
                public void accept(Throwable throwable) throws Exception {
                  throwable.printStackTrace();
                  collectionView.hideRefreshing();
                }
              });
    }
focal_method.class_method_signature: CollectionViewPresenter.onRefresh()
focal_method.full_signature:  void onRefresh()
focal_method.identifier: onRefresh
focal_method.invocations: disposeDisposable subscribe map map fetchNewest includeLoading hideRefreshing setItems printStackTrace hideRefreshing
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void onRefresh()