@@ -0,0 +1,1846 @@
+package org.openlmis.core.repository;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.InjectMocks;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0Aimport org.openlmis.core.domain.ConfigurationSetting;%0Aimport org.openlmis.core.repository.mapper.ConfigurationSettingMapper;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.powermock.api.mockito.PowerMockito.when;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class ConfigurationSettingRepositoryTest %7B%0A%0A  @Mock%0A  private ConfigurationSettingMapper mapper;%0A%0A  @InjectMocks%0A  private ConfigurationSettingRepository repository;%0A%0A%0A  @Test%0A  public void shouldGetByKey() throws Exception %7B%0A%0A    ConfigurationSetting expectedConfiguration = new ConfigurationSetting();%0A    expectedConfiguration.setKey(%22COUNTRY%22);%0A%0A    when(mapper.getByKey(%22123%22)).thenReturn(expectedConfiguration);%0A%0A    ConfigurationSetting actual = repository.getByKey(%22123%22);%0A%0A    verify(mapper).getByKey(%22123%22);%0A    assertEquals(actual.getKey(), expectedConfiguration.getKey());%0A%0A  %7D%0A%0A%0A  @Test%0A  public void shouldGetAll() throws Exception %7B%0A    List%3CConfigurationSetting%3E expectedConfigSettings = new ArrayList%3CConfigurationSetting%3E();%0A    expectedConfigSettings.add(new ConfigurationSetting());%0A    when(mapper.getAll()).thenReturn(expectedConfigSettings);%0A%0A    List%3CConfigurationSetting%3E actualSettings = repository.getAll();%0A    verify(mapper).getAll();%0A    assertEquals(expectedConfigSettings.size(), actualSettings.size());%0A  %7D%0A%0A%0A  @Test%0A  public void shouldSetValue() throws Exception %7B%0A    ConfigurationSetting setting = new ConfigurationSetting();%0A    setting.setKey(%22COUNTRY%22);%0A%0A    repository.setValue(setting);%0A%0A    verify(mapper).updateValue(setting);%0A  %7D%0A%0A%0A%7D %0A

Add unit test for Configuration Setting Repository Test