RepositoryEntityListener implements EntityListener { @Override public void onTokenTransfer(TokenTransfer tokenTransfer) throws ImporterException { tokenTransferRepository.save(tokenTransfer); }  @Override boolean isEnabled(); @Override void onContractResult(ContractResult contractResult); @Override void onCryptoTransfer(CryptoTransfer cryptoTransfer); @Override void onEntityId(EntityId entityId); @Override void onFileData(FileData fileData); @Override void onLiveHash(LiveHash liveHash); @Override void onNonFeeTransfer(NonFeeTransfer nonFeeTransfer); @Override void onToken(Token token); @Override void onTokenAccount(TokenAccount tokenAccount); @Override void onTokenTransfer(TokenTransfer tokenTransfer); @Override void onTopicMessage(TopicMessage topicMessage); @Override void onTransaction(Transaction transaction);  }
@Test void onTokenTransfer() throws ImporterException { TokenTransfer tokenTransfer = new TokenTransfer(); tokenTransfer.setAmount(1000); tokenTransfer.setId(new TokenTransfer.Id(2L, TOKEN_ID, ENTITY_ID)); repositoryEntityListener.onTokenTransfer(tokenTransfer); assertThat(tokenTransferRepository.findAll()).contains(tokenTransfer); }