@Test
public void testListBlockMetadatasByHash() throws Exception {

  // given
  final BlockTemplate blockTemplate = new BlockTemplate(contextStorage);
  final Requester mockRequester = mock(Requester.class);
  final List<BlockMetadata> expected = emptyList();
  when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any()))
      .thenReturn(expected);
  blockTemplate.requester = mockRequester;
  // then
  final List<BlockMetadata> actual = blockTemplate.listBlockMetadatas(anyBlockHash, anySize);
  assertEquals(expected, actual);
}