DeviceTypeManagerService implements DeviceManagementService { @Override public PolicyMonitoringManager getPolicyMonitoringManager() { return policyMonitoringManager; } DeviceTypeManagerService(DeviceTypeConfigIdentifier deviceTypeConfigIdentifier,
                                    DeviceTypeConfiguration deviceTypeConfiguration); @Override String getType(); @Override OperationMonitoringTaskConfig getOperationMonitoringConfig(); @Override void init(); @Override DeviceManager getDeviceManager(); @Override ApplicationManager getApplicationManager(); @Override ProvisioningConfig getProvisioningConfig(); @Override PushNotificationConfig getPushNotificationConfig(); @Override PolicyMonitoringManager getPolicyMonitoringManager(); @Override InitialOperationConfig getInitialOperationConfig(); @Override PullNotificationSubscriber getPullNotificationSubscriber(); DeviceStatusTaskPluginConfig getDeviceStatusTaskPluginConfig(); @Override GeneralConfig getGeneralConfig(); void setGeneralConfig(DeviceTypeConfiguration deviceTypeConfiguration);  }
@Test(description = "This test case tests the policy monitoring configuration setting.") public void testSetPolicyMonitoring() throws InvocationTargetException, IllegalAccessException { setPolicyMonitoringManager .invoke(androidDeviceTypeManagerService, androidDeviceConfiguration.getPolicyMonitoring()); Assert.assertEquals(androidDeviceTypeManagerService.getPolicyMonitoringManager() != null, (androidDeviceConfiguration.getPolicyMonitoring() != null && androidDeviceConfiguration .getPolicyMonitoring().isEnabled()), "Policy Management configurations are added as per the " + "configuration file"); setPolicyMonitoringManager .invoke(rasberrypiDeviceTypeManagerService, rasberrypiDeviceConfiguration.getPolicyMonitoring()); Assert.assertEquals(rasberrypiDeviceTypeManagerService.getPolicyMonitoringManager() != null, (rasberrypiDeviceConfiguration.getPolicyMonitoring() != null && rasberrypiDeviceConfiguration .getPolicyMonitoring().isEnabled()), "Policy Management configurations are added as " + "per the " + "configuration file"); }