@Test public void testLock() throws Exception { final KeyStoreTemplate keystoreTemplate = new KeyStoreTemplate(contextStorage); final Requester mockRequester = mock(Requester.class); final boolean expected = false; when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any())) .thenReturn(expected); keystoreTemplate.requester = mockRequester; final boolean actual = keystoreTemplate.lock(anyAuthentication); assertEquals(expected, actual); }
@Override public boolean lock(final Authentication authentication) { return request(keyStoreMethods.getLock(), Arrays.<Object>asList(authentication)); }
KeyStoreTemplate extends AbstractTemplate implements KeyStoreOperation { @Override public boolean lock(final Authentication authentication) { return request(keyStoreMethods.getLock(), Arrays.<Object>asList(authentication)); } }
KeyStoreTemplate extends AbstractTemplate implements KeyStoreOperation { @Override public boolean lock(final Authentication authentication) { return request(keyStoreMethods.getLock(), Arrays.<Object>asList(authentication)); } KeyStoreTemplate(final ContextStorage<Context> contextStorage); }
KeyStoreTemplate extends AbstractTemplate implements KeyStoreOperation { @Override public boolean lock(final Authentication authentication) { return request(keyStoreMethods.getLock(), Arrays.<Object>asList(authentication)); } KeyStoreTemplate(final ContextStorage<Context> contextStorage); @Override List<AccountAddress> list(); @Override AccountAddress create(final String password); @Override boolean lock(final Authentication authentication); @Override boolean unlock(final Authentication authentication); @Override Transaction sign(final RawTransaction rawTransaction); @Override AccountAddress importKey(final EncryptedPrivateKey encryptedKey, final String oldPassword,
      final String newPassword); @Override EncryptedPrivateKey exportKey(final Authentication authentication); @Override TxHash send(final AccountAddress sender, final AccountAddress recipient, final Aer amount,
      final BytesValue payload); }
KeyStoreTemplate extends AbstractTemplate implements KeyStoreOperation { @Override public boolean lock(final Authentication authentication) { return request(keyStoreMethods.getLock(), Arrays.<Object>asList(authentication)); } KeyStoreTemplate(final ContextStorage<Context> contextStorage); @Override List<AccountAddress> list(); @Override AccountAddress create(final String password); @Override boolean lock(final Authentication authentication); @Override boolean unlock(final Authentication authentication); @Override Transaction sign(final RawTransaction rawTransaction); @Override AccountAddress importKey(final EncryptedPrivateKey encryptedKey, final String oldPassword,
      final String newPassword); @Override EncryptedPrivateKey exportKey(final Authentication authentication); @Override TxHash send(final AccountAddress sender, final AccountAddress recipient, final Aer amount,
      final BytesValue payload);  }