/**
   * Loads all the Variant objects where we did notice some failures on sending for the given user
   */
  @Override
  public List<ApplicationVariant> getVariantsWithWarnings() {
    final List<String> warningIDs = pushMessageInformationDao.findVariantIDsWithWarnings();
    if (warningIDs.isEmpty()) {
      return Collections.emptyList();
    }

    return wrapApplicationVariant(pushApplicationDao.findByVariantIds(warningIDs));
  }
  @Test
  public void shouldFindPushApplicationNameAndIDBasedOnVariantID() {

    // when
    final List<PushApplication> applications =
        pushApplicationDao.findByVariantIds(Arrays.asList("1"));

    // then
    assertThat(applications).isNotEmpty();
    assertThat(applications.size()).isEqualTo(1);

    final PushApplication application = applications.iterator().next();
    assertThat(application.getName()).isEqualTo("Push App 1");
    assertThat(application.getVariants()).isNotEmpty();
    assertThat(application.getVariants().size()).isEqualTo(1);
    assertThat(application.getVariants().iterator().next().getId()).isEqualTo("1");
  }