### Question:
SearchAdapter { static SearchResult newSearchResultFrom( final org.apache.wiki.search.SearchResult result ) { return new SearchResult() { @Override public Page getPage() { return result.getPage(); } @Override public int getScore() { return result.getScore(); } @Override public String[] getContexts() { return result.getContexts(); } }; }    }### Answer:
@Test public void testNewSearchResultFrom() { final org.apache.wiki.search.SearchResult old = new org.apache.wiki.search.SearchResult() { @Override public WikiPage getPage() { return null; } @Override public int getScore() { return 0; } @Override public String[] getContexts() { return new String[ 0 ]; } }; final SearchResult sr = SearchAdapter.newSearchResultFrom( old ); Assertions.assertEquals( old.getPage(), sr.getPage() ); Assertions.assertEquals( old.getScore(), sr.getScore() ); Assertions.assertArrayEquals( old.getContexts(), sr.getContexts() ); }