### Question:
RepositorySearchTaskProxy extends RepositorySearchTask { @Override public boolean hasNext() { return mDelegate != null && mDelegate.hasNext(); } RepositorySearchTaskProxy(SearchTaskFactory searchTaskFactory); @NotNull @Override List<Resource> nextLookup(); @Override boolean hasNext();  }### Answer:
@Test public void testHasNext() throws Exception { when(mDelegate.hasNext()).thenReturn(true); assertThat("Has next returns false by default", searchTask.hasNext(), is(false)); searchTask.nextLookup(); assertThat("Has next returns true from delegate", searchTask.hasNext(), is(true)); }