SaveUserDemoSelectedListUseCase extends UseCase<Boolean> { @Override public Observable<Boolean> react() { assert userDemoEntity != null; return repository.saveSelectedUserDemoList(userDemoEntity); } @Inject  SaveUserDemoSelectedListUseCase(UI ui, UserDemoRepository repository); SaveUserDemoSelectedListUseCase with(UserDemoEntity userDemoEntity); @Override Observable<Boolean> react();  }
@Test(expected=AssertionError.class) public void When_Save_Null_Then_Throws_Assertion_Error() { TestSubscriber<Boolean> subscriberMock = new TestSubscriber<>(); saveUserDemoSelectedListUseCaseUT.react().subscribe(subscriberMock); subscriberMock.awaitTerminalEvent(); }