public Page<InstanceConfig> findActiveInstanceConfigsByReleaseKey(String releaseKey, Pageable
      pageable) {
    return instanceConfigRepository.findByReleaseKeyAndDataChangeLastModifiedTimeAfter(releaseKey,
            getValidInstanceConfigDate(), pageable);
  }
@Test
  @Rollback
  public void testFindActiveInstanceConfigs() throws Exception {
    long someInstanceId = 1;
    long anotherInstanceId = 2;
    String someConfigAppId = "someConfigAppId";
    String someConfigClusterName = "someConfigClusterName";
    String someConfigNamespaceName = "someConfigNamespaceName";
    Date someValidDate = new Date();
    Pageable pageable = PageRequest.of(0, 10);
    String someReleaseKey = "someReleaseKey";

    Calendar calendar = Calendar.getInstance();
    calendar.add(Calendar.DATE, -2);
    Date someInvalidDate = calendar.getTime();

    prepareInstanceConfigForInstance(someInstanceId, someConfigAppId, someConfigClusterName,
        someConfigNamespaceName, someReleaseKey, someValidDate);
    prepareInstanceConfigForInstance(anotherInstanceId, someConfigAppId, someConfigClusterName,
        someConfigNamespaceName, someReleaseKey, someInvalidDate);

    Page<InstanceConfig> validInstanceConfigs = instanceService
        .findActiveInstanceConfigsByReleaseKey(someReleaseKey, pageable);

    assertEquals(1, validInstanceConfigs.getContent().size());
    assertEquals(someInstanceId, validInstanceConfigs.getContent().get(0).getInstanceId());
  }