@Test
public void testSetScalingPolicy() throws Exception {

    PutPolicyRequest request = PutPolicyRequest.newBuilder().build();
    when(serviceMock.setAutoScalingPolicy(request, JUNIT_REST_CALL_METADATA)).thenReturn(Observable.just(SCALING_POLICY_ID));
    ScalingPolicyID entity = SpringMockMvcUtil.doPost(mockMvc, "/api/v3/autoscaling/scalingPolicy", request, ScalingPolicyID.class);
    assertThat(entity).isEqualTo(SCALING_POLICY_ID);
    verify(serviceMock, times(1)).setAutoScalingPolicy(request, JUNIT_REST_CALL_METADATA);
}