use of com.github.alexcojocaru.mojo.elasticsearch.v2.client.ElasticsearchClientException in project elasticsearch-maven-plugin by alexcojocaru.
the class BootstrapClusterStepTest method testExecuteInitCommandPut.
@Test
public void testExecuteInitCommandPut() throws ElasticsearchClientException {
ElasticsearchCommand command = mock(ElasticsearchCommand.class);
when(command.getRequestMethod()).thenReturn(RequestMethod.PUT);
when(command.getJson()).thenReturn("json");
when(command.getRelativeUrl()).thenReturn("index/type/id");
step.executeInitCommand(client, log, command);
verify(client).put("/index/type/id", "json");
}
Aggregations