@Test
public void testGetScalingPolicyForJob() throws Exception {

    JobId jobId = JobId.newBuilder().setId("myJobId").build();
    when(serviceMock.getJobScalingPolicies(jobId, JUNIT_REST_CALL_METADATA)).thenReturn(Observable.just(GET_POLICY_RESULT));
    GetPolicyResult entity = SpringMockMvcUtil.doGet(mockMvc, String.format("/api/v3/autoscaling/scalingPolicies/%s", jobId.getId()), GetPolicyResult.class);
    assertThat(entity).isEqualTo(GET_POLICY_RESULT);
    verify(serviceMock, times(1)).getJobScalingPolicies(jobId, JUNIT_REST_CALL_METADATA);
}