source: class DeviceManagementServiceImplTest {
  
      private static final Log log;
      private static final String TEST_DEVICE_TYPE;
      private static final String TEST_DEVICE_NAME;
      private static final String DEFAULT_USERNAME;
      private static final String TENANT_AWARE_USERNAME;
      private static final String DEFAULT_ROLE;
      private static final String DEFAULT_OWNERSHIP;
      private static final String DEFAULT_STATUS;
      private static final String DEFAULT_DATE_FORMAT;
      private DeviceManagementService deviceManagementService;
      private DeviceAccessAuthorizationService deviceAccessAuthorizationService;
      private DeviceManagementProviderService deviceManagementProviderService;
  
      @Test(description = "Testing getting effective policy of a device")
      public void testGetEffectivePolicyOfDevice() throws PolicyManagementException {
  
target:         PolicyManagerService policyManagerService = Mockito.mock(PolicyManagerService.class, Mockito.RETURNS_MOCKS);
          PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getPolicyManagementService"))
                  .toReturn(policyManagerService);
          Response response = this.deviceManagementService
                  .getEffectivePolicyOfDevice(TEST_DEVICE_TYPE, UUID.randomUUID().toString(), null);
          Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
                  "Expects to return HTTP 200 when retrieving effective policy is successful");
      }
  
  }