@Override
    public void onError(Throwable exception) {
        onFatalError(exception);
    }
@Test
    void testOnError() throws Exception {
        new Context() {
            {
                final Throwable fatalError = new Throwable("Testing fatal error");
                runTest(
                        () -> {
                            runInMainThread(() -> getResourceManager().onError(fatalError));
                            final Throwable reportedError =
                                    getFatalErrorHandler()
                                            .getErrorFuture()
                                            .get(TIMEOUT_SEC, TimeUnit.SECONDS);
                            assertThat(reportedError).isSameAs(fatalError);
                        });
            }
        };
    }