CreateSnapshotRepositoryRequestExecutorImpl implements CreateSnapshotRepositoryRequestExecutor { protected PutRepositoryRequest createPutRepositoryRequest( CreateSnapshotRepositoryRequest createSnapshotRepositoryRequest) { PutRepositoryRequest putRepositoryRequest = new PutRepositoryRequest( createSnapshotRepositoryRequest.getName()); Settings.Builder builder = Settings.builder(); builder.put( FsRepository.COMPRESS_SETTING.getKey(), createSnapshotRepositoryRequest.isCompress()); builder.put( FsRepository.LOCATION_SETTING.getKey(), createSnapshotRepositoryRequest.getLocation()); putRepositoryRequest.settings(builder); putRepositoryRequest.type(createSnapshotRepositoryRequest.getType()); putRepositoryRequest.verify(createSnapshotRepositoryRequest.isVerify()); return putRepositoryRequest; }  @Override CreateSnapshotRepositoryResponse execute(
		CreateSnapshotRepositoryRequest createSnapshotRepositoryRequest);  }
@Test public void testCreatePutRepositoryRequest() { CreateSnapshotRepositoryRequest createSnapshotRepositoryRequest = new CreateSnapshotRepositoryRequest("name", "location"); createSnapshotRepositoryRequest.setCompress(true); createSnapshotRepositoryRequest.setType("type"); createSnapshotRepositoryRequest.setVerify(true); CreateSnapshotRepositoryRequestExecutorImpl createSnapshotRepositoryRequestExecutorImpl = new CreateSnapshotRepositoryRequestExecutorImpl() { { setElasticsearchClientResolver(_elasticsearchFixture); } }; PutRepositoryRequest putRepositoryRequest = createSnapshotRepositoryRequestExecutorImpl. createPutRepositoryRequest(createSnapshotRepositoryRequest); Settings settings = putRepositoryRequest.settings(); Assert.assertEquals( String.valueOf(createSnapshotRepositoryRequest.isCompress()), settings.get(FsRepository.COMPRESS_SETTING.getKey())); Assert.assertEquals( String.valueOf(createSnapshotRepositoryRequest.getLocation()), settings.get(FsRepository.LOCATION_SETTING.getKey())); Assert.assertEquals( createSnapshotRepositoryRequest.getName(), putRepositoryRequest.name()); Assert.assertEquals( createSnapshotRepositoryRequest.getType(), putRepositoryRequest.type()); Assert.assertEquals( createSnapshotRepositoryRequest.isVerify(), putRepositoryRequest.verify()); }