@Test
public void testConfigOptimizationParameterHandling() throws Exception {

    PolicyParameters parameters = createParametersObject();
    parameters.setPolicyConfigType(PolicyConfigType.Optimization);
    PolicyValidationRequestWrapper wrapper = new PolicyValidationRequestWrapper();
    PolicyRestAdapter adapter = wrapper.populateRequestParameters((parameters));
    assertEquals("Optimization", adapter.getConfigPolicyType());
    parameters.setConfigBody("{\"someParameter\": \"someValue\"}");
    adapter = wrapper.populateRequestParameters((parameters));
    assertEquals("Optimization", adapter.getConfigPolicyType());
    parameters.setConfigBody("{\"service\": \"MyService\"}");
    adapter = wrapper.populateRequestParameters((parameters));
    assertEquals("MyService", adapter.getServiceType());
}