@Test
public void testListEvents() throws Exception {

  // given
  final ContractTemplate contractTemplate = new ContractTemplate(contextStorage);
  final Requester mockRequester = mock(Requester.class);
  final List<Event> expected = emptyList();
  when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any()))
      .thenReturn(expected);
  contractTemplate.requester = mockRequester;
  // then
  final EventFilter eventFilter = EventFilter.newBuilder(anyContractAddress).build();
  final List<Event> actual = contractTemplate.listEvents(eventFilter);
  assertEquals(expected, actual);
}