### Question:
YearsParticipatedDropdownSubscriber extends Subscriber<List<Integer>> { @Override public void onNext(List<Integer> apiYears) { int[] years = new int[apiYears.size()]; for (int i = apiYears.size() - 1; i >= 0; i--) { years[i] = apiYears.get(i); } Arrays.sort(years); for (int i = 0; i < years.length / 2; i++) { int temp = years[i]; int index = years.length - i - 1; years[i] = years[index]; years[index] = temp; } AndroidSchedulers.mainThread().createWorker() .schedule(() -> mCallback.updateYearsParticipated(years)); } @Inject  YearsParticipatedDropdownSubscriber(YearsParticipatedUpdate callback); @Override void onCompleted(); @Override void onError(Throwable e); @Override void onNext(List<Integer> apiYears);  }### Answer:
@Test(expected = NullPointerException.class) public void testParseNullData() { mSubscriber.onNext(null); }
@Test public void testParsedData() { int[] expected = {2015, 2014, 2013, 2012}; mSubscriber.onNext(mYearsParticipated); verify(mCallback).updateYearsParticipated(expected); }