/**
   * Parameterized test case to check the message text for the specified number of warnings and
   * files.
   *
   * @param numberOfWarnings the number of warnings
   * @param numberOfFiles the number of files
   * @param expectedMessage the expected message
   */
  private void checkSummaryText(
      final int numberOfWarnings, final int numberOfFiles, final String expectedMessage) {
    DryResult result = mock(DryResult.class);
    when(result.getNumberOfAnnotations()).thenReturn(numberOfWarnings);
    when(result.getNumberOfModules()).thenReturn(numberOfFiles);

    Assert.assertEquals(
        "Wrong summary message created.",
        Messages.DRY_ProjectAction_Name() + expectedMessage,
        ResultSummary.createSummary(result));
  }