@Test public void testGetChainInfo() throws Exception { final BlockchainTemplate blockchainTemplate = new BlockchainTemplate(contextStorage); final Requester mockRequester = mock(Requester.class); final ChainInfo expected = ChainInfo.newBuilder().build(); when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any())) .thenReturn(expected); blockchainTemplate.requester = mockRequester; final ChainInfo actual = blockchainTemplate.getChainInfo(); assertEquals(expected, actual); }
@Override public ChainInfo getChainInfo() { return request(blockchainMethods.getChainInfo()); }
BlockchainTemplate extends AbstractTemplate implements BlockchainOperation { @Override public ChainInfo getChainInfo() { return request(blockchainMethods.getChainInfo()); } }
BlockchainTemplate extends AbstractTemplate implements BlockchainOperation { @Override public ChainInfo getChainInfo() { return request(blockchainMethods.getChainInfo()); } BlockchainTemplate(final ContextStorage<Context> contextStorage); }
BlockchainTemplate extends AbstractTemplate implements BlockchainOperation { @Override public ChainInfo getChainInfo() { return request(blockchainMethods.getChainInfo()); } BlockchainTemplate(final ContextStorage<Context> contextStorage); @Override ChainIdHash getChainIdHash(); @Override BlockchainStatus getBlockchainStatus(); @Override ChainInfo getChainInfo(); @Override ChainStats getChainStats(); @Override List<Peer> listPeers(); @Override List<Peer> listPeers(final boolean showHidden, final boolean showSelf); @Override List<PeerMetric> listPeerMetrics(); @Override ServerInfo getServerInfo(final List<String> categories); @Override NodeStatus getNodeStatus(); }
BlockchainTemplate extends AbstractTemplate implements BlockchainOperation { @Override public ChainInfo getChainInfo() { return request(blockchainMethods.getChainInfo()); } BlockchainTemplate(final ContextStorage<Context> contextStorage); @Override ChainIdHash getChainIdHash(); @Override BlockchainStatus getBlockchainStatus(); @Override ChainInfo getChainInfo(); @Override ChainStats getChainStats(); @Override List<Peer> listPeers(); @Override List<Peer> listPeers(final boolean showHidden, final boolean showSelf); @Override List<PeerMetric> listPeerMetrics(); @Override ServerInfo getServerInfo(final List<String> categories); @Override NodeStatus getNodeStatus();  }