### Question:
CustomSubscriber extends AbstractSubscriber<T> { @Override protected void release() { eventClass = null; receiver = null; filter = null; scheduler = null; } CustomSubscriber(@NonNull Class<T> eventClass, @NonNull Consumer<T> receiver); @SuppressWarnings("WeakerAccess") CustomSubscriber<T> withFilter(@NonNull Predicate<T> filter); @SuppressWarnings("WeakerAccess") CustomSubscriber<T> withScheduler(@NonNull Scheduler scheduler); @Override boolean equals(Object other); @Override int hashCode();  }### Answer:
@Test public void testRelease() throws Exception { subscriber.withFilter(filter); subscriber.withScheduler(scheduler); subscriber.release(); assertNull(subscriber.getEventClass()); assertNull(subscriber.getFilter()); assertNull(subscriber.getScheduler()); try { subscriber.acceptEvent(object); fail("Expected an NullPointerException to be thrown"); } catch (NullPointerException e) { assertTrue(true); } }