@Test public void testDescribeInstanceWithFailureAffinity() throws Exception { MockingHelper.setExpectedExceptions(exception, RuntimeException.class, "Invalid affinity value: [WRONG_VALUE]. Valid values: default, host."); InstanceInputs instanceInputs = new InstanceInputs.Builder() .withFilterNamesString("affinity") .withFilterValuesString("WRONG_VALUE") .build(); toTest.execute(getCommonInputs("DescribeInstances", HEADERS), instanceInputs); }
@SafeVarargs public final <T> Map<String, String> execute(CommonInputs commonInputs, T... builders) throws Exception { InputsWrapper inputs = InputsWrapperBuilder.getWrapper(commonInputs, builders); Map<String, String> queryParamsMap = ParamsMapBuilder.getParamsMap(inputs); Map<String, String> headersMap = HeadersMapBuilder.getHeadersMap(inputs); setQueryApiParams(inputs, queryParamsMap); setQueryApiHeaders(inputs, headersMap, queryParamsMap); Map<String, String> awsResponse = new HttpClientService().execute(inputs.getHttpClientInputs()); return getValidResponse(awsResponse); }
QueryApiExecutor { @SafeVarargs public final <T> Map<String, String> execute(CommonInputs commonInputs, T... builders) throws Exception { InputsWrapper inputs = InputsWrapperBuilder.getWrapper(commonInputs, builders); Map<String, String> queryParamsMap = ParamsMapBuilder.getParamsMap(inputs); Map<String, String> headersMap = HeadersMapBuilder.getHeadersMap(inputs); setQueryApiParams(inputs, queryParamsMap); setQueryApiHeaders(inputs, headersMap, queryParamsMap); Map<String, String> awsResponse = new HttpClientService().execute(inputs.getHttpClientInputs()); return getValidResponse(awsResponse); } }
QueryApiExecutor { @SafeVarargs public final <T> Map<String, String> execute(CommonInputs commonInputs, T... builders) throws Exception { InputsWrapper inputs = InputsWrapperBuilder.getWrapper(commonInputs, builders); Map<String, String> queryParamsMap = ParamsMapBuilder.getParamsMap(inputs); Map<String, String> headersMap = HeadersMapBuilder.getHeadersMap(inputs); setQueryApiParams(inputs, queryParamsMap); setQueryApiHeaders(inputs, headersMap, queryParamsMap); Map<String, String> awsResponse = new HttpClientService().execute(inputs.getHttpClientInputs()); return getValidResponse(awsResponse); }  }
QueryApiExecutor { @SafeVarargs public final <T> Map<String, String> execute(CommonInputs commonInputs, T... builders) throws Exception { InputsWrapper inputs = InputsWrapperBuilder.getWrapper(commonInputs, builders); Map<String, String> queryParamsMap = ParamsMapBuilder.getParamsMap(inputs); Map<String, String> headersMap = HeadersMapBuilder.getHeadersMap(inputs); setQueryApiParams(inputs, queryParamsMap); setQueryApiHeaders(inputs, headersMap, queryParamsMap); Map<String, String> awsResponse = new HttpClientService().execute(inputs.getHttpClientInputs()); return getValidResponse(awsResponse); }  @SafeVarargs final Map<String, String> execute(CommonInputs commonInputs, T... builders); }
QueryApiExecutor { @SafeVarargs public final <T> Map<String, String> execute(CommonInputs commonInputs, T... builders) throws Exception { InputsWrapper inputs = InputsWrapperBuilder.getWrapper(commonInputs, builders); Map<String, String> queryParamsMap = ParamsMapBuilder.getParamsMap(inputs); Map<String, String> headersMap = HeadersMapBuilder.getHeadersMap(inputs); setQueryApiParams(inputs, queryParamsMap); setQueryApiHeaders(inputs, headersMap, queryParamsMap); Map<String, String> awsResponse = new HttpClientService().execute(inputs.getHttpClientInputs()); return getValidResponse(awsResponse); }  @SafeVarargs final Map<String, String> execute(CommonInputs commonInputs, T... builders);  }