package de.mvitz.jprops.core.impl.provider;

import static org.fest.assertions.Assertions.assertThat;

import org.junit.Test;

public class SystemPropertyProviderTest {

    @Test
    public void nonPrefixProviderShouldUseGivenKey() throws Exception {
        System.setProperty("abc", "foo");
        try {
            assertThat(new SystemPropertyProvider().get("abc")).isEqualTo("foo");
        } finally {
            System.clearProperty("abc");
        }
    }

    @Test
    public void prefixProviderShouldUseGivenPrefixAndKey() throws Exception {
        System.setProperty("abc", "foo");
        try {
            assertThat(new SystemPropertyProvider("ab").get("c")).isEqualTo("foo");
        } finally {
            System.clearProperty("abc");
        }
    }

}

@@ -767,10 +767,180 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void providerShouldReturnNullWhenNoPropertyIsFound() throws Exception %7B%0A        assertThat(new SystemPropertyProvider().get(%22abc%22)).isNull();%0A    %7D%0A%0A
 %7D%0A

Add junit test for SystemPropertyProvider.