@Test
public void isWalletNameExists() {

    List<Wallet> list = new ArrayList<>();
    Wallet wallet = new Wallet();
    wallet.setCreateTime(1115448481);
    wallet.setName("001");
    wallet.setAddress("0xfb1b74328f936973a59620d683e1b1acb487d9e7");
    AccountBalance balance = new AccountBalance();
    balance.setFree("10000000084489");
    balance.setLock("0");
    wallet.setAccountBalance(balance);
    list.add(wallet);
    Wallet wallet2 = new Wallet();
    wallet2.setCreateTime(1115448485);
    wallet2.setName("002");
    wallet2.setAddress("0x2e95e3ce0a54951eb9a99152a6d5827872dfb4fd");
    AccountBalance balance2 = new AccountBalance();
    balance2.setFree("1000000005655655");
    balance2.setLock("0");
    wallet2.setAccountBalance(balance2);
    list.add(wallet2);
    Wallet wallet3 = new Wallet();
    wallet3.setName("003");
    wallet3.setAddress("0xca4b151b0b100ae53c9d78dd136905e681622ee7");
    wallet3.setCreateTime(1115448483);
    AccountBalance balance3 = new AccountBalance();
    balance3.setFree("10000000056556584855");
    balance3.setLock("0");
    wallet3.setAccountBalance(balance3);
    list.add(wallet3);
    Wallet wallet4 = new Wallet();
    wallet4.setName("004");
    wallet4.setCreateTime(1115448486);
    AccountBalance balance4 = new AccountBalance();
    balance4.setFree("1000000001156584855");
    balance4.setLock("0");
    wallet4.setAccountBalance(balance4);
    list.add(wallet4);
    boolean isExitName = Flowable
            .fromIterable(list)
            .map(new Function<Wallet, Boolean>() {
                @Override
                public Boolean apply(Wallet walletEntity) throws Exception {
                    return walletEntity.getName().toLowerCase().equals("002");
                }
            })
            .filter(new Predicate<Boolean>() {
                @Override
                public boolean test(Boolean aBoolean) throws Exception {
                    return aBoolean;
                }
            })
            .firstElement()
            .defaultIfEmpty(false)
            .blockingGet();
    Log.d("=========", "名称是否存在" + "====>" + isExitName);
}