function _makeSimulatedNetworkRequest(getValue) {
  const durationMs = 400;
  return new Promise(function (resolve, reject) {
    setTimeout(function () {
      if (isNetworkFailure()) {
        reject(new Error('Network failure'));
      } else {
        getValue(resolve, reject);
      }
    }, durationMs);
  });
}
Helper for the other functions in this file.
Simulates a short delay and then returns a provided value or failure.
This is just a dummy example. Normally we'd make a HTTP request,
see http://facebook.github.io/react-native/docs/network.html