@Override
  public CanaryScope buildCanaryScope(CanaryScope scope) {
    WavefrontCanaryScope wavefrontCanaryScope = new WavefrontCanaryScope();
    wavefrontCanaryScope.setScope(scope.getScope());
    wavefrontCanaryScope.setLocation(scope.getLocation());
    wavefrontCanaryScope.setStart(scope.getStart());
    wavefrontCanaryScope.setEnd(scope.getEnd());
    wavefrontCanaryScope.setStep(scope.getStep());
    wavefrontCanaryScope.setGranularity(generateGranularity(scope.getStep()));
    wavefrontCanaryScope.setExtendedScopeParams(scope.getExtendedScopeParams());
    return wavefrontCanaryScope;
  }
@Test
  public void testBuildCanaryScope_WithDayGranularity() {
    CanaryScope canaryScope =
        new CanaryScope(
            "scope",
            "location",
            Instant.now(),
            Instant.now(),
            WavefrontCanaryScopeFactory.DAY,
            null);
    CanaryScope generatedCanaryScope = queryBuilder.buildCanaryScope(canaryScope);
    WavefrontCanaryScope wavefrontCanaryScope = (WavefrontCanaryScope) generatedCanaryScope;
    assertThat(wavefrontCanaryScope.getGranularity()).isEqualTo("d");
  }