// Path: src/main/java/com/tngtech/propertyloader/impl/helpers/HostsHelper.java
// public class HostsHelper {
// 
//     public List<String> getLocalHostNames() {
//         Set<String> hostSet = new HashSet<String>();
// 
//         for (InetAddress host : getLocalHosts()) {
//             hostSet.add(host.getHostName());
//         }
// 
//         List<String> hostNames = new ArrayList<String>(hostSet);
//         Collections.sort(hostNames);
// 
//         return hostNames;
//     }
// 
//     private InetAddress[] getLocalHosts() {
//         InetAddress in;
// 
//         try {
//             in = InetAddress.getLocalHost();
//         } catch (UnknownHostException uE) {
//             return new InetAddress[0];
//         }
// 
//         try {
//             return InetAddress.getAllByName(in.getHostName());
//         } catch (UnknownHostException uE) {
//             return new InetAddress[]{in};
//         }
//     }
// }


import com.tngtech.propertyloader.impl.helpers.HostsHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
package com.tngtech.propertyloader.impl;





@RunWith(MockitoJUnitRunner.class)
public class DefaultPropertySuffixContainerTest {

    private DefaultPropertySuffixContainer propertySuffix;
    private List<String> list;
    String[] testAddLocalHostNamesAndAddSuffixList = {"testAddLocalHostNames", "testAddSuffixList"};

    @Mock
    private HostsHelper hostshelper;

    @Before
    public void setUp() {
        list = Arrays.asList(testAddLocalHostNamesAndAddSuffixList);
        when(hostshelper.getLocalHostNames()).thenReturn(list);
        propertySuffix = new DefaultPropertySuffixContainer((hostshelper));
        propertySuffix.addString("testThatAddMethodDoesNotClearList");
    }

    @Test
    public void testAddUserName() {
        assertEquals(propertySuffix, propertySuffix.addUserName());
        assertTrue(propertySuffix.getSuffixes().contains(System.getProperty("user.name")));
        assertTrue(propertySuffix.getSuffixes().contains("testThatAddMethodDoesNotClearList"));
    }

    @Test
    public void testAddLocalHostNames() {
        assertEquals(propertySuffix, propertySuffix.addLocalHostNames());
        assertTrue(propertySuffix.getSuffixes().contains("testAddLocalHostNames"));
        assertTrue(propertySuffix.getSuffixes().contains("testThatAddMethodDoesNotClearList"));
    }

    @Test
    public void testAddString() {
// Path: src/main/java/com/tngtech/propertyloader/impl/helpers/HostsHelper.java
// public class HostsHelper {
// 
//     public List<String> getLocalHostNames() {
//         Set<String> hostSet = new HashSet<String>();
// 
//         for (InetAddress host : getLocalHosts()) {
//             hostSet.add(host.getHostName());
//         }
// 
//         List<String> hostNames = new ArrayList<String>(hostSet);
//         Collections.sort(hostNames);
// 
//         return hostNames;
//     }
// 
//     private InetAddress[] getLocalHosts() {
//         InetAddress in;
// 
//         try {
//             in = InetAddress.getLocalHost();
//         } catch (UnknownHostException uE) {
//             return new InetAddress[0];
//         }
// 
//         try {
//             return InetAddress.getAllByName(in.getHostName());
//         } catch (UnknownHostException uE) {
//             return new InetAddress[]{in};
//         }
//     }
// }


// Path: src/test/java/com/tngtech/propertyloader/impl/DefaultPropertySuffixContainerTest.java
import com.tngtech.propertyloader.impl.helpers.HostsHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;

package com.tngtech.propertyloader.impl;





@RunWith(MockitoJUnitRunner.class)
public class DefaultPropertySuffixContainerTest {

    private DefaultPropertySuffixContainer propertySuffix;
    private List<String> list;
    String[] testAddLocalHostNamesAndAddSuffixList = {"testAddLocalHostNames", "testAddSuffixList"};

    @Mock
    private HostsHelper hostshelper;

    @Before
    public void setUp() {
        list = Arrays.asList(testAddLocalHostNamesAndAddSuffixList);
        when(hostshelper.getLocalHostNames()).thenReturn(list);
        propertySuffix = new DefaultPropertySuffixContainer((hostshelper));
        propertySuffix.addString("testThatAddMethodDoesNotClearList");
    }

    @Test
    public void testAddUserName() {
        assertEquals(propertySuffix, propertySuffix.addUserName());
        assertTrue(propertySuffix.getSuffixes().contains(System.getProperty("user.name")));
        assertTrue(propertySuffix.getSuffixes().contains("testThatAddMethodDoesNotClearList"));
    }

    @Test
    public void testAddLocalHostNames() {
        assertEquals(propertySuffix, propertySuffix.addLocalHostNames());
        assertTrue(propertySuffix.getSuffixes().contains("testAddLocalHostNames"));
        assertTrue(propertySuffix.getSuffixes().contains("testThatAddMethodDoesNotClearList"));
    }

    @Test
    public void testAddString() {
        assertEquals(propertySuffix, propertySuffix.addString("testAddString"));