@Test public void testRaisesErrorEvent() { Query query = Query.atPath(path("rooms/eros")); AtomicBoolean hadEvent = new AtomicBoolean(false); QueryListener listener = new QueryListener( query, new ListenOptions(), (value, error) -> { assertNull(value); assertNotNull(error); hadEvent.set(true); }); Status status = Status.ALREADY_EXISTS.withDescription("test error"); FirebaseFirestoreException error = Util.exceptionFromStatus(status); listener.onError(error); assertTrue(hadEvent.get()); }
public void onError(FirebaseFirestoreException error) { listener.onEvent(null, error); }
QueryListener { public void onError(FirebaseFirestoreException error) { listener.onEvent(null, error); } }
QueryListener { public void onError(FirebaseFirestoreException error) { listener.onEvent(null, error); } QueryListener(
      Query query, EventManager.ListenOptions options, EventListener<ViewSnapshot> listener); }
QueryListener { public void onError(FirebaseFirestoreException error) { listener.onEvent(null, error); } QueryListener(
      Query query, EventManager.ListenOptions options, EventListener<ViewSnapshot> listener); Query getQuery(); boolean onViewSnapshot(ViewSnapshot newSnapshot); void onError(FirebaseFirestoreException error); boolean onOnlineStateChanged(OnlineState onlineState); }
QueryListener { public void onError(FirebaseFirestoreException error) { listener.onEvent(null, error); } QueryListener(
      Query query, EventManager.ListenOptions options, EventListener<ViewSnapshot> listener); Query getQuery(); boolean onViewSnapshot(ViewSnapshot newSnapshot); void onError(FirebaseFirestoreException error); boolean onOnlineStateChanged(OnlineState onlineState);  }