@Test
public void parseOSName() {

    String old = System.getProperty("os.name");
    try {
        System.setProperty("os.name", "windows7");
        Assert.assertTrue(SystemInfo.parseOSName()[0]);
        System.setProperty("os.name", "linux123");
        Assert.assertTrue(SystemInfo.parseOSName()[1]);
        System.setProperty("os.name", "mac osx123");
        Assert.assertTrue(SystemInfo.parseOSName()[2]);
    } finally {
        if (old == null) {
            System.clearProperty("os.name");
        } else {
            System.setProperty("os.name", old);
        }
    }
}