private Accessor resolveCase (TaskExecution aSwitch) {
    Object expression = aSwitch.getRequired("expression");
    List<MapObject> cases = aSwitch.getList("cases", MapObject.class);
    Assert.notNull(cases,"you must specify 'cases' in a switch statement");
    for(MapObject oneCase : cases) {
      Object key = oneCase.getRequired("key");
      if(key.equals(expression)) {
        return oneCase;
      }
    }
    return new MapObject( aSwitch.getMap("default",Collections.emptyMap()) );    
  }
@author Arik Cohen
@since Jun 3, 2017
@see SwitchTaskCompletionHandler
src/main/java/com/creactiviti/piper/core/task/SwitchTaskDispatcher.java