GetAliases extends GenericResultAbstractAction { @Override public String getRestMethodName() { return "GET"; } protected  GetAliases(Builder builder); @Override String getRestMethodName();  }
@Test public void testBasicUriGeneration() { GetAliases getAliases = new GetAliases.Builder().addIndex("twitter").build(); assertEquals("GET", getAliases.getRestMethodName()); assertEquals("twitter/_alias", getAliases.getURI(ElasticsearchVersion.UNKNOWN)); }
@Test public void testBasicUriGenerationWithAliases() { GetAliases getAliases = new GetAliases.Builder().addIndex("twitter").addAlias("alias").build(); assertEquals("GET", getAliases.getRestMethodName()); assertEquals("twitter/_alias/alias", getAliases.getURI(ElasticsearchVersion.UNKNOWN)); }
@Test public void testBasicUriGenerationWithMultipleAliases() { GetAliases getAliases = new GetAliases.Builder().addIndex("twitter").addAliases(Arrays.asList(new String[]{"alias1", "alias2"})).build(); assertEquals("GET", getAliases.getRestMethodName()); assertEquals("twitter/_alias/alias1,alias2", getAliases.getURI(ElasticsearchVersion.UNKNOWN)); }