public Optional<SearchVersion> getVersion() {
        return nodeAdapter.version();
    }
@Test
    public void retrievingVersionSucceedsIfElasticsearchVersionIsValid() throws Exception {
        when(nodeAdapter.version()).thenReturn(Optional.of(SearchVersion.elasticsearch("5.4.0")));

        final Optional<SearchVersion> elasticsearchVersion = node.getVersion();

        assertThat(elasticsearchVersion).contains(SearchVersion.elasticsearch(5, 4, 0));
    }