@Test(expected = NullPointerException.class) public void popEmptyEnvironmentStackShouldFail() { context.pop(); context.pop(); }
public Environment pop() { Objects.requireNonNull(environment, "Fail to pop context due to no environment present"); Environment curEnv = environment; environment = curEnv.getParent(); return curEnv; }
SemanticContext { public Environment pop() { Objects.requireNonNull(environment, "Fail to pop context due to no environment present"); Environment curEnv = environment; environment = curEnv.getParent(); return curEnv; } }
SemanticContext { public Environment pop() { Objects.requireNonNull(environment, "Fail to pop context due to no environment present"); Environment curEnv = environment; environment = curEnv.getParent(); return curEnv; }  }
SemanticContext { public Environment pop() { Objects.requireNonNull(environment, "Fail to pop context due to no environment present"); Environment curEnv = environment; environment = curEnv.getParent(); return curEnv; }  void push(); Environment peek(); Environment pop(); }
SemanticContext { public Environment pop() { Objects.requireNonNull(environment, "Fail to pop context due to no environment present"); Environment curEnv = environment; environment = curEnv.getParent(); return curEnv; }  void push(); Environment peek(); Environment pop();  }