@Override
  public Distribution distribute(D2CanaryDistributionStrategy strategy)
  {
    switch (strategy.getStrategy()) {
      case TARGET_HOSTS:
        return distributeByTargetHosts(strategy);
      case TARGET_APPLICATIONS:
        return distributeByTargetApplications(strategy);
      case PERCENTAGE:
        return distributeByPercentage(strategy);
      case DISABLED:
        return Distribution.STABLE;
      default:
        _log.warn("Invalid distribution strategy type: " + strategy.getStrategy().name());
        return Distribution.STABLE;
    }
  }
@Test(dataProvider = "getNormalCasesForPercentageStrategy")
  public void testNormalCasesForPercentageStrategy(D2CanaryDistributionStrategy strategy, int hashResult,
      CanaryDistributionProvider.Distribution expected)
  {
    CanaryDistributionProviderImplFixture fixture = new CanaryDistributionProviderImplFixture();
    Assert.assertEquals(fixture.getSpiedImpl(hashResult).distribute(strategy), expected,
        "Testing percentage strategy: " + strategy + ", with hash result: " + hashResult + ", should return: "
            + expected.name());
  }