public void testContextBuilding() {
MockAutocompleterEnvironment helper = new MockAutocompleterEnvironment();
String text = "a .bc.de .f";
helper.setup(new PathUtil("foo.py"), text, 0, text.length(), true);
PyProposalBuilder proposalBuilder = new PyProposalBuilder();
CompletionContext<PyState> completionContext = proposalBuilder
.buildContext(helper.editor.getSelection(), helper.parser);
assertEquals("previous context", "a.bc.de.", completionContext.getPreviousContext());
assertEquals("triggering string", "f", completionContext.getTriggeringString());
}