### Question:
CobolVariableContext implements SubContext<Variable> { public Variable get(String name) { return variables.stream() .filter(variable -> ofNullable(variable.getName()).orElse("").equalsIgnoreCase(name)) .findFirst() .orElse(null); }  @Override void define(Variable variable, Location location); @Override void addUsage(String variable, Location location); @Override List<Variable> getAll(); @Override boolean contains(String name); @Override Multimap<String, Location> getDefinitions(); @Override Multimap<String, Location> getUsages(); @Override void merge(SubContext<Variable> subContext); Variable get(String name); boolean parentContainsSpecificChild(String rootVariableName, String targetVariableName); static final int LEVEL_77; static final int LEVEL_66; static final int LEVEL_88; }### Answer:
@Test void searchVariableInStructureHappyTest() { assertTrue(isVariableDefinedInStructure(variableList.get(0), "CHILD")); }
@Test void searchVariableInStructureBadTest() { assertFalse(isVariableDefinedInStructure(variableList.get(0), "CHILD222")); }
@Test void getVariableByNameHappyTest() { assertNotNull(get(PARENT1)); }
@Test void getVariableByNameBadTest() { assertNull(get("NEW-VARIABLE-NOT-CREATED")); }