@Test
public void testSign() throws Exception {

  // given
  final KeyStoreTemplate keystoreTemplate = new KeyStoreTemplate(contextStorage);
  final Requester mockRequester = mock(Requester.class);
  final Transaction expected = anyTransaction;
  when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any()))
      .thenReturn(expected);
  keystoreTemplate.requester = mockRequester;
  // then
  final Transaction actual = keystoreTemplate.sign(anyRawTransaction);
  assertEquals(expected, actual);
}