// validate that the rates and volatilities providers are coherent
 private void validate(
     RatesProvider ratesProvider,
     ExpandedSwaption swaption,
     NormalVolatilitySwaptionProvider volatilityProvider) {
   ArgChecker.isTrue(
       volatilityProvider
           .getValuationDateTime()
           .toLocalDate()
           .equals(ratesProvider.getValuationDate()),
       "volatility and rate data should be for the same date");
   ArgChecker.isFalse(
       swaption.getUnderlying().isCrossCurrency(), "underlying swap should be single currency");
   ArgChecker.isTrue(
       swaption.getSwaptionSettlement().getSettlementType().equals(SettlementType.PHYSICAL),
       "swaption should be physical settlement");
 }