@@ -0,0 +1,857 @@
+package co.poynt.postman.test;%0A%0Aimport org.testng.Assert;%0Aimport org.testng.annotations.Test;%0A%0Aimport co.poynt.postman.model.PostmanEnvironment;%0Aimport co.poynt.postman.model.PostmanVariables;%0A%0Apublic class TestPostmanVariables %7B%0A%0A%09@Test%0A%09public void testVariableSubstitution() throws Exception %7B%0A%09%09PostmanEnvironment env = new PostmanEnvironment();%0A%0A%09%09env.setEnvironmentVariable(%22foo%22, %22bar%22);%0A%0A%09%09PostmanVariables var = new PostmanVariables(env);%0A%0A%09%09String result = var.replace(%22%7B%7Bfoo%7D%7D%22);%0A%0A%09%09Assert.assertEquals(result, %22bar%22);%0A%09%7D%0A%0A%09@Test%0A%09public void testVariableSubstitutionWithWhitespace() throws Exception %7B%0A%09%09PostmanEnvironment env = new PostmanEnvironment();%0A%0A%09%09env.setEnvironmentVariable(%22foo%22, %22bar%22);%0A%0A%09%09PostmanVariables var = new PostmanVariables(env);%0A%0A%09%09String result = var.replace(%22%7B%7B foo    %7D%7D%22);%0A%0A%09%09Assert.assertEquals(result, %22bar%22);%0A%09%7D%0A%7D%0A

trim white spaces around variable key name.