@Test
public void testBlockingInAsyncException() {

    FDBDatabaseFactory factory = FDBDatabaseFactory.instance();
    factory.setBlockingInAsyncDetection(BlockingInAsyncDetection.IGNORE_COMPLETE_EXCEPTION_BLOCKING);
    // Make sure that we aren't holding on to previously created databases
    factory.clear();
    FDBDatabase database = factory.getDatabase();
    assertEquals(BlockingInAsyncDetection.IGNORE_COMPLETE_EXCEPTION_BLOCKING, database.getBlockingInAsyncDetection());
    assertThrows(BlockingInAsyncException.class, () -> callAsyncBlocking(database));
}