### Question:
ContentManipulationLockService { public boolean isLockedForProvider(String providerName) { List<String> locks = getCurrentLocks(); return locks != null && (locks.contains(API_ID_ALL) || locks.contains(providerName)); }  boolean isLockedForProvider(String providerName); List<String> getLockInfo(); boolean createLock(String providerName); void createLockAll(); boolean removeLock(String providerName); void removeLockAll(); static final String API_ID_ALL; }### Answer:
@Test public void isLockedForProvider() { ContentManipulationLockService tested = getTested(); Assert.assertFalse(tested.isLockedForProvider(PROVIDER_1)); Mockito.when(tested.configService.get(ContentManipulationLockService.CFGFILE_NAME)).thenReturn( new HashMap<String, Object>()); Assert.assertFalse(tested.isLockedForProvider(PROVIDER_1)); Mockito.when(tested.configService.get(ContentManipulationLockService.CFGFILE_NAME)).thenReturn(createCfgFileAll()); Assert.assertTrue(tested.isLockedForProvider(PROVIDER_1)); Assert.assertTrue(tested.isLockedForProvider(PROVIDER_2)); Assert.assertTrue(tested.isLockedForProvider(PROVIDER_3)); Mockito.when(tested.configService.get(ContentManipulationLockService.CFGFILE_NAME)).thenReturn(createCfgFileP1P2()); Assert.assertTrue(tested.isLockedForProvider(PROVIDER_1)); Assert.assertTrue(tested.isLockedForProvider(PROVIDER_2)); Assert.assertFalse(tested.isLockedForProvider(PROVIDER_3)); }