public void hasNetworkConnection(NetworkRequestCheckListener listener){
  if (hasNetworkConnection()) {
    testNetworkRequest(listener);
  }
 else {
    listener.onNoResponse();
  }
}

public void hasNetworkConnection ( NetworkRequestCheckListener listener ) { if ( hasNetworkConnection ( ) ) { testNetworkRequest ( listener ) ; } else { listener . onNoResponse ( ) ; } }
utility method which checks current network connection state , but will also try to perform test network request , in order to determine if user can actually perform any network operation .
