private MockNetworkTable tableForKey(String key){
  if (key.contains("/")) {
    return (MockNetworkTable)getSubTable(key.substring(0,key.lastIndexOf('/')));
  }
 else {
    return this;
  }
}

private MockNetworkTable tableForKey ( String key ) { if ( key . contains ( "/" ) ) { return ( MockNetworkTable ) getSubTable ( key . substring ( 0 , key . lastIndexOf ( '/' ) ) ) ; } else { return this ; } }
gets the relevant table for the given key e . g . " / foo / bar " - > " / foo " .
