<commit_before>import org.apache.felix.ipojo.everest.services.IllegalActionOnResourceException;
import org.apache.felix.ipojo.everest.services.Resource;
import org.apache.felix.ipojo.everest.services.ResourceMetadata;
import org.apache.felix.ipojo.everest.services.ResourceNotFoundException;
import org.junit.Test;

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

/**
 * Created with IntelliJ IDEA.
 * User: root
 * Date: 16/07/13
 * Time: 17:36
 * To change this template use File | Settings | File Templates.
 */
public class TestEnvironment extends CommonTest {


    @Test
    public void testCommonMetadataPresent() throws ResourceNotFoundException, IllegalActionOnResourceException {
        Resource r = read("/system/environment");
        // Resource should not be observable
        assertThat(r.isObservable()).isFalse();
        ResourceMetadata m = r.getMetadata();
        assertThat(m.get("TERM")).isNotEqualTo(null);
        assertThat(m.get("SHLVL")).isNotEqualTo(null);
        assertThat(m.get("LESSCLOSE")).isNotEqualTo(null);
        assertThat(m.get("XFILESEARCHPATH")).isNotEqualTo(null);
        assertThat(m.get("SUDO_UID")).isNotEqualTo(null);
        assertThat(m.get("COLORTERM")).isNotEqualTo(null);
        assertThat(m.get("MAIL")).isNotEqualTo(null);
        assertThat(m.get("XDG_SESSION_COOKIE")).isNotEqualTo(null);
        assertThat(m.get("PWD")).isNotEqualTo(null);
        assertThat(m.get("LOGNAME")).isNotEqualTo(null);
        assertThat(m.get("SUDO_USER")).isNotEqualTo(null);
        assertThat(m.get("_")).isNotEqualTo(null);
        assertThat(m.get("NLSPATH")).isNotEqualTo(null);
        assertThat(m.get("OLDPWD")).isNotEqualTo(null);
        assertThat(m.get("SHELL")).isNotEqualTo(null);
        assertThat(m.get("SUDO_GID")).isNotEqualTo(null);
        assertThat(m.get("PATH")).isNotEqualTo(null);
        assertThat(m.get("DISPLAY")).isNotEqualTo(null);
        assertThat(m.get("USER")).isNotEqualTo(null);
        assertThat(m.get("HOME")).isNotEqualTo(null);
        assertThat(m.get("LESSOPEN")).isNotEqualTo(null);
        assertThat(m.get("XAUTHORITY")).isNotEqualTo(null);
        assertThat(m.get("SUDO_COMMAND")).isNotEqualTo(null);
        assertThat(m.get("LS_COLORS")).isNotEqualTo(null);
        assertThat(m.get("USERNAME")).isNotEqualTo(null);
        assertThat(m.get("XDG_RUNTIME_DIR")).isNotEqualTo(null);
        assertThat(m.get("LANG")).isNotEqualTo(null);
    }
}<commit_msg>fix for latest merge, environment variables are different in each machine<commit_after>import org.apache.felix.ipojo.everest.services.IllegalActionOnResourceException;
import org.apache.felix.ipojo.everest.services.Resource;
import org.apache.felix.ipojo.everest.services.ResourceMetadata;
import org.apache.felix.ipojo.everest.services.ResourceNotFoundException;
import org.junit.Test;

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

/**
 * Created with IntelliJ IDEA.
 * User: root
 * Date: 16/07/13
 * Time: 17:36
 * To change this template use File | Settings | File Templates.
 */
public class TestEnvironment extends CommonTest {


    @Test
    public void testCommonMetadataPresent() throws ResourceNotFoundException, IllegalActionOnResourceException {
        Resource r = read("/system/environment");
        // Resource should not be observable
        assertThat(r.isObservable()).isFalse();
        ResourceMetadata m = r.getMetadata();
        assertThat(m.keySet()).isNotEmpty();
//        assertThat(m.get("TERM")).isNotEqualTo(null);
//        assertThat(m.get("SHLVL")).isNotEqualTo(null);
//        assertThat(m.get("LESSCLOSE")).isNotEqualTo(null);
//        assertThat(m.get("XFILESEARCHPATH")).isNotEqualTo(null);
//        assertThat(m.get("SUDO_UID")).isNotEqualTo(null);
//        assertThat(m.get("COLORTERM")).isNotEqualTo(null);
//        assertThat(m.get("MAIL")).isNotEqualTo(null);
//        assertThat(m.get("XDG_SESSION_COOKIE")).isNotEqualTo(null);
//        assertThat(m.get("PWD")).isNotEqualTo(null);
//        assertThat(m.get("LOGNAME")).isNotEqualTo(null);
//        assertThat(m.get("SUDO_USER")).isNotEqualTo(null);
//        assertThat(m.get("_")).isNotEqualTo(null);
//        assertThat(m.get("NLSPATH")).isNotEqualTo(null);
//        assertThat(m.get("OLDPWD")).isNotEqualTo(null);
//        assertThat(m.get("SHELL")).isNotEqualTo(null);
//        assertThat(m.get("SUDO_GID")).isNotEqualTo(null);
//        assertThat(m.get("PATH")).isNotEqualTo(null);
//        assertThat(m.get("DISPLAY")).isNotEqualTo(null);
//        assertThat(m.get("USER")).isNotEqualTo(null);
//        assertThat(m.get("HOME")).isNotEqualTo(null);
//        assertThat(m.get("LESSOPEN")).isNotEqualTo(null);
//        assertThat(m.get("XAUTHORITY")).isNotEqualTo(null);
//        assertThat(m.get("SUDO_COMMAND")).isNotEqualTo(null);
//        assertThat(m.get("LS_COLORS")).isNotEqualTo(null);
//        assertThat(m.get("USERNAME")).isNotEqualTo(null);
//        assertThat(m.get("XDG_RUNTIME_DIR")).isNotEqualTo(null);
//        assertThat(m.get("LANG")).isNotEqualTo(null);
    }
}
{'fraction_non_alphanumeric': 0.16532178704979333, 'fraction_numerical': 0.00393623302499508, 'mean_word_length': 4.0516898608349905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5827175', 'n_tokens_mistral': 1616, 'n_tokens_neox': 1699, 'n_words': 177}