Change zone from static to member variable in ZoneAffinityPredicate as in some cases zone may be set when the instance is created. Change the throw clause from HttpClientResponse to general Exception for easy sub-classing.