RankingConstant { public String getFileName() { return path; } RankingConstant(String name);  RankingConstant(String name, TensorType type, String fileName); PathType getPathType(); void setFileName(String fileName); void setUri(String uri); void setType(TensorType type); void sendTo(Collection<? extends AbstractService> services); String getName(); String getFileName(); String getUri(); String getFileReference(); TensorType getTensorType(); String getType(); void validate(); String toString();  }
@Test public void constant_file_does_not_need_path_or_ending() throws Exception { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); SearchBuilder searchBuilder = new SearchBuilder(rankProfileRegistry); searchBuilder.importString(joinLines( "search test {", " document test { }", " constant foo {", " type: tensor(x{})", " file: simplename", " }", "}" )); searchBuilder.build(); Search search = searchBuilder.getSearch(); RankingConstant constant = search.rankingConstants().asMap().values().iterator().next(); assertEquals("simplename", constant.getFileName()); }