@Test
public void createBufferFactoryCrashOnSubscribe() {

    FlowableReplay.create(Flowable.just(1), new Callable<ReplayBuffer<Integer>>() {
        @Override
        public ReplayBuffer<Integer> call() throws Exception {
            throw new TestException();
        }
    })
    .test()
    .assertFailure(TestException.class);
}