@Test
public void testGetBlockMetadataByHash() throws Exception {

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