Repository: jhipster/generator-jhipster
Pull request #10378 (2019-09-10 06:56:36)

update liquibase configuration in gradle so it works with gradle conv…
…entions

-   Please make sure the below checklist is followed for Pull Requests.

-   [ ] [Travis tests](https://travis-ci.org/jhipster/generator-jhipster/pull_requests) are green
-   [ ] Tests are added where necessary
-   [ ] Documentation is added/updated where necessary
-   [ ] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed

<!--
Please also reference the issue number in a commit message to [automatically close the related Github issue](https://help.github.com/articles/closing-issues-via-commit-messages/)

Note: It is also possible to add `[skip ci]` to your commit message to skip Travis tests
-->



Patch:
diff --git a/generators/client/templates/react/package.json.ejs b/generators/client/templates/react/package.json.ejs
index 7dff3d5dfc..daad7a7838 100644
--- a/generators/client/templates/react/package.json.ejs
+++ b/generators/client/templates/react/package.json.ejs
@@ -177,8 +177,7 @@ limitations under the License.
   },
 <%_ if (clientPackageManager === 'yarn') { _%>
   "resolutions": {
-    "@types/react": "16.8.10",
-    "redux": "4.0.1"
+    "@types/react": "16.8.10"
   },
 <%_ } _%>
   "engines": {
diff --git a/generators/generator-base-private.js b/generators/generator-base-private.js
index 77c2af433e..35edb92891 100644
--- a/generators/generator-base-private.js
+++ b/generators/generator-base-private.js
@@ -832,7 +832,7 @@ module.exports = class extends Generator {
         }
 
         // Path to the yo cli script in generator-jhipster's node_modules
-        const yoInternalCliPath = require.resolve('yo/lib/cli.js');
+        const yoInternalCliPath = path.join(__dirname, '../node_modules/yo/lib/cli.js');
 
         shelljs.exec(`node ${yoInternalCliPath} --generators`, { silent: true }, (err, stdout, stderr) => {
             if (!stdout.includes(` ${blueprint}\n`) && !stdout.includes(` ${generatorName}\n`)) {
diff --git a/generators/server/files.js b/generators/server/files.js
index 6218a1428e..1f5d0fe7d6 100644
--- a/generators/server/files.js
+++ b/generators/server/files.js
@@ -1701,10 +1701,6 @@ const serverFiles = {
                 {
                     file: 'package/web/rest/AuditResourceIT.java',
                     renameTo: generator => `${generator.testDir}web/rest/AuditResourceIT.java`
-                },
-                {
-                    file: 'package/service/AuditEventServiceIT.java',
-                    renameTo: generator => `${generator.testDir}service/AuditEventServiceIT.java`
                 }
             ]
         },
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs
index 16e8a9805e..aa502bf372 100644
--- a/generators/server/templates/build.gradle.ejs
+++ b/generators/server/templates/build.gradle.ejs
@@ -203,7 +203,7 @@ liquibase {
     activities {
         main {
             driver "<% if (devDatabaseType === 'mysql') { %>com.mysql.cj.jdbc.Driver<% } else if (devDatabaseType === 'mariadb') { %>org.mariadb.jdbc.Driver<% } else if (devDatabaseType === 'postgresql') { %>org.postgresql.Driver<% } else if (devDatabaseType === 'h2Disk') { %>org.h2.Driver<% } else if (devDatabaseType === 'oracle') { %>oracle.jdbc.OracleDriver<% } %>"
-            url "<% if (devDatabaseType === 'mysql') { %>jdbc:mysql://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'mariadb') { %>jdbc:mariadb://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'postgresql') { %>jdbc:postgresql://localhost:5432/<%= baseName %><% } else if (devDatabaseType === 'h2Disk') { %>jdbc:h2:file:./target/h2db/db/<%= lowercaseBaseName %><% } else if (devDatabaseType === 'oracle') { %>jdbc:oracle:thin:@localhost:1521:<%= baseName %><% } else if (devDatabaseType === 'mssql') { %>jdbc:sqlserver://localhost:1433;database=<%= baseName %><% } %>"
+            url "<% if (devDatabaseType === 'mysql') { %>jdbc:mysql://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'mariadb') { %>jdbc:mariadb://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'postgresql') { %>jdbc:postgresql://localhost:5432/<%= baseName %><% } else if (devDatabaseType === 'h2Disk') { %>jdbc:h2:file:./build/h2db/db/<%= lowercaseBaseName %><% } else if (devDatabaseType === 'oracle') { %>jdbc:oracle:thin:@localhost:1521:<%= baseName %><% } else if (devDatabaseType === 'mssql') { %>jdbc:sqlserver://localhost:1433;database=<%= baseName %><% } %>"
             username "<% if (devDatabaseType === 'mysql') { %>root<% } else if (devDatabaseType === 'postgresql' || devDatabaseType === 'h2Disk' || devDatabaseType === 'h2Memory') { %><%= baseName %><% } else if (devDatabaseType === 'mssql') { %>SA<% } %>"
             password "<% if (devDatabaseType === 'mssql') { %>yourStrong(!)Password<% } %>"
             changeLogFile "<%= SERVER_MAIN_RES_DIR %>config/liquibase/master.xml"
@@ -213,7 +213,7 @@ liquibase {
         }
         diffLog {
             driver "<% if (devDatabaseType === 'mysql') { %>com.mysql.cj.jdbc.Driver<% } else if (devDatabaseType === 'mariadb') { %>org.mariadb.jdbc.Driver<% } else if (devDatabaseType === 'postgresql') { %>org.postgresql.Driver<% } else if (devDatabaseType === 'h2Disk') { %>org.h2.Driver<% } else if (devDatabaseType === 'oracle') { %>oracle.jdbc.OracleDriver<% } %>"
-            url "<% if (devDatabaseType === 'mysql') { %>jdbc:mysql://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'mariadb') { %>jdbc:mariadb://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'postgresql') { %>jdbc:postgresql://localhost:5432/<%= baseName %><% } else if (devDatabaseType === 'h2Disk') { %>jdbc:h2:file:./target/h2db/db/<%= lowercaseBaseName %><% } else if (devDatabaseType === 'oracle') { %>jdbc:oracle:thin:@localhost:1521:<%= baseName %><% } else if (devDatabaseType === 'mssql') { %>jdbc:sqlserver://localhost:1433;database=<%= baseName %><% } %>"
+            url "<% if (devDatabaseType === 'mysql') { %>jdbc:mysql://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'mariadb') { %>jdbc:mariadb://localhost:3306/<%= baseName %><% } else if (devDatabaseType === 'postgresql') { %>jdbc:postgresql://localhost:5432/<%= baseName %><% } else if (devDatabaseType === 'h2Disk') { %>jdbc:h2:file:./build/h2db/db/<%= lowercaseBaseName %><% } else if (devDatabaseType === 'oracle') { %>jdbc:oracle:thin:@localhost:1521:<%= baseName %><% } else if (devDatabaseType === 'mssql') { %>jdbc:sqlserver://localhost:1433;database=<%= baseName %><% } %>"
             username "<% if (devDatabaseType === 'mysql') { %>root<% } else if (devDatabaseType === 'postgresql' || devDatabaseType === 'h2Disk' || devDatabaseType === 'h2Memory') { %><%= baseName %><% } else if (devDatabaseType === 'mssql') { %>SA<% } %>"
             password "<% if (devDatabaseType === 'mssql') { %>yourStrong(!)Password<% } %>"
             changeLogFile project.ext.diffChangelogFile
diff --git a/generators/server/templates/gradle.properties.ejs b/generators/server/templates/gradle.properties.ejs
index adf1b5f1b3..58f70970d2 100644
--- a/generators/server/templates/gradle.properties.ejs
+++ b/generators/server/templates/gradle.properties.ejs
@@ -28,10 +28,10 @@ yarn_version=<%= YARN_VERSION %>
 jhipster_dependencies_version=3.0.5-SNAPSHOT
 # The spring-boot version should match the one managed by
 # https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster_dependencies_version}
-spring_boot_version=2.1.8.RELEASE
+spring_boot_version=2.1.7.RELEASE
 # The hibernate version should match the one managed by
 # https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/${spring-boot.version} -->
-hibernate_version=5.3.11.Final
+hibernate_version=5.3.10.Final
 mapstruct_version=1.3.0.Final
 
 liquibase_hibernate5_version=3.7
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs
index 1f503c130c..1cd48cd922 100644
--- a/generators/server/templates/pom.xml.ejs
+++ b/generators/server/templates/pom.xml.ejs
@@ -94,14 +94,14 @@
         <jhipster-dependencies.version>3.0.5-SNAPSHOT</jhipster-dependencies.version>
         <!-- The spring-boot version should match the one managed by
         https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster-dependencies.version} -->
-        <spring-boot.version>2.1.8.RELEASE</spring-boot.version>
+        <spring-boot.version>2.1.7.RELEASE</spring-boot.version>
 <%_ if (databaseType === 'sql') { _%>
         <!-- The spring framework version should match the one managed by
         https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/${spring-boot.version} -->
         <spring.version>5.1.9.RELEASE</spring.version>
         <!-- The hibernate version should match the one managed by
         https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/${spring-boot.version} -->
-        <hibernate.version>5.3.11.Final</hibernate.version>
+        <hibernate.version>5.3.10.Final</hibernate.version>
         <!-- The javassist version should match the one managed by
         https://mvnrepository.com/artifact/org.hibernate/hibernate-core/${hibernate.version} -->
         <javassist.version>3.23.1-GA</javassist.version>
diff --git a/generators/server/templates/src/main/java/package/config/ApplicationProperties.java.ejs b/generators/server/templates/src/main/java/package/config/ApplicationProperties.java.ejs
index 60458bd32a..21ce0c13c5 100644
--- a/generators/server/templates/src/main/java/package/config/ApplicationProperties.java.ejs
+++ b/generators/server/templates/src/main/java/package/config/ApplicationProperties.java.ejs
@@ -28,4 +28,5 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
  */
 @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
 public class ApplicationProperties {
+
 }
diff --git a/generators/server/templates/src/main/java/package/repository/PersistenceAuditEventRepository.java.ejs b/generators/server/templates/src/main/java/package/repository/PersistenceAuditEventRepository.java.ejs
index 3884d5adbd..6ecb4b809c 100644
--- a/generators/server/templates/src/main/java/package/repository/PersistenceAuditEventRepository.java.ejs
+++ b/generators/server/templates/src/main/java/package/repository/PersistenceAuditEventRepository.java.ejs
@@ -20,14 +20,9 @@ package <%=packageName%>.repository;
 
 import <%=packageName%>.domain.PersistentAuditEvent;
 import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-
-<% if (databaseType === 'sql') { %>
-import org.springframework.data.jpa.repository.JpaRepository;
-<% } %>
-<% if (databaseType === 'mongodb') { %>
-import org.springframework.data.mongodb.repository.MongoRepository;
-<% } %>
+import org.springframework.data.domain.Pageable;<% if (databaseType === 'sql') { %>
+import org.springframework.data.jpa.repository.JpaRepository;<% } %><% if (databaseType === 'mongodb') { %>
+import org.springframework.data.mongodb.repository.MongoRepository;<% } %>
 
 import java.time.Instant;
 import java.util.List;
@@ -51,6 +46,4 @@ public interface PersistenceAuditEventRepository extends <% if (databaseType ===
     List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principal, Instant after, String type);
 
     Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable);
-
-    List<PersistentAuditEvent> findByAuditEventDateBefore(Instant before);
 }
diff --git a/generators/server/templates/src/main/java/package/service/AuditEventService.java.ejs b/generators/server/templates/src/main/java/package/service/AuditEventService.java.ejs
index 7d8b2433be..74dbe2ef93 100644
--- a/generators/server/templates/src/main/java/package/service/AuditEventService.java.ejs
+++ b/generators/server/templates/src/main/java/package/service/AuditEventService.java.ejs
@@ -18,22 +18,15 @@
 -%>
 package <%=packageName%>.service;
 
-import io.github.jhipster.config.JHipsterProperties;
 import <%=packageName%>.config.audit.AuditEventConverter;
 import <%=packageName%>.repository.PersistenceAuditEventRepository;
 import org.springframework.boot.actuate.audit.AuditEvent;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
-import org.springframework.stereotype.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.scheduling.annotation.Scheduled;
-<% if (databaseType === 'sql') { %>
-import org.springframework.transaction.annotation.Transactional;
-<% } %>
+import org.springframework.stereotype.Service;<% if (databaseType === 'sql') { %>
+import org.springframework.transaction.annotation.Transactional;<% } %>
 
 import java.time.Instant;
-import java.time.temporal.ChronoUnit;
 import java.util.Optional;
 
 /**
@@ -45,36 +38,16 @@ import java.util.Optional;
 @Transactional<% } %>
 public class AuditEventService {
 
-    private final Logger log = LoggerFactory.getLogger(AuditEventService.class);
-
-    private final JHipsterProperties jHipsterProperties;
-
     private final PersistenceAuditEventRepository persistenceAuditEventRepository;
 
     private final AuditEventConverter auditEventConverter;
 
     public AuditEventService(
         PersistenceAuditEventRepository persistenceAuditEventRepository,
-        AuditEventConverter auditEventConverter, JHipsterProperties jhipsterProperties) {
+        AuditEventConverter auditEventConverter) {
 
         this.persistenceAuditEventRepository = persistenceAuditEventRepository;
         this.auditEventConverter = auditEventConverter;
-        this.jHipsterProperties = jhipsterProperties;
-    }
-
-    /**
-    * Old audit events should be automatically deleted after 30 days.
-    *
-    * This is scheduled to get fired at 12:00 (am).
-    */
-    @Scheduled(cron = "0 0 12 * * ?")
-    public void removeOldAuditEvents() {
-        persistenceAuditEventRepository
-            .findByAuditEventDateBefore(Instant.now().minus(jHipsterProperties.getAuditEvents().getRetentionPeriod(), ChronoUnit.DAYS))
-            .forEach(auditEvent -> {
-                log.debug("Deleting audit data {}", auditEvent.toString());
-                persistenceAuditEventRepository.delete(auditEvent);
-        });
     }
 
     public Page<AuditEvent> findAll(Pageable pageable) {
diff --git a/generators/server/templates/src/main/java/package/service/UserService.java.ejs b/generators/server/templates/src/main/java/package/service/UserService.java.ejs
index aa255a3b83..a0c3a2606c 100644
--- a/generators/server/templates/src/main/java/package/service/UserService.java.ejs
+++ b/generators/server/templates/src/main/java/package/service/UserService.java.ejs
@@ -796,7 +796,7 @@ public class UserService {
         <%= databaseType === 'no' ? asDto('User') : asEntity('User') %> user = getUser(attributes);
         user.setAuthorities(authToken.getAuthorities().stream()
             .map(GrantedAuthority::getAuthority)
-            <%_ if (databaseType === 'sql' || databaseType === 'mongodb') { _%>
+            <%_ if (databaseType !== 'no') { _%>
             .map(authority -> {
                 Authority auth = new Authority();
                 auth.setName(authority);
diff --git a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
index 1459859167..611f72195b 100644
--- a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs
@@ -367,10 +367,6 @@ jhipster:
             host: localhost
             port: 5000
             queue-size: 512
-    <%_ if (databaseType === 'sql' || databaseType === 'mongodb' || databaseType === 'couchbase') { _%>
-    audit-events:
-        retention-period: 30 # Number of days before audit events are deleted.
-    <%_ } _%>
 <%_ if (applicationType === 'uaa') { _%>
 uaa:
     key-store:
diff --git a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
index 8d63fb751a..96ddb57083 100644
--- a/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
+++ b/generators/server/templates/src/main/resources/config/application-prod.yml.ejs
@@ -351,10 +351,6 @@ jhipster:
             host: localhost
             port: 5000
             queue-size: 512
-    <%_ if (databaseType === 'sql' || databaseType === 'mongodb' || databaseType === 'couchbase') { _%>
-    audit-events:
-        retention-period: 30 # Number of days before audit events are deleted.
-    <%_ } _%>
 <%_ if (applicationType === 'uaa') { _%>
 uaa:
     #be sure to to change to a different keystore in production!


Test patch:
diff --git a/generators/server/templates/src/test/java/package/service/AuditEventServiceIT.java.ejs b/generators/server/templates/src/test/java/package/service/AuditEventServiceIT.java.ejs
deleted file mode 100644
index e1241af357..0000000000
--- a/generators/server/templates/src/test/java/package/service/AuditEventServiceIT.java.ejs
+++ /dev/null
@@ -1,118 +0,0 @@
-<%#
- Copyright 2013-2019 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
-package <%= packageName %>.service;
-
-import <%= packageName %>.domain.PersistentAuditEvent;
-import <%= packageName %>.repository.PersistenceAuditEventRepository;
-import <%=packageName%>.<%= mainClass %>;
-import io.github.jhipster.config.JHipsterProperties;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-<%_ if (databaseType === 'sql') { _%>
-import org.springframework.transaction.annotation.Transactional;
-<%_ } _%>
-<%_ if (databaseType === 'couchbase') { _%>
-import static <%= packageName %>.web.rest.TestUtil.mockAuthentication;
-<%_ } _%>
-<%_ if (messageBroker === 'kafka') { _%>
-import org.springframework.kafka.test.context.EmbeddedKafka;
-<%_ } _%>
-<%_ if (authenticationType === 'oauth2') { _%>
-import <%= packageName %>.config.TestSecurityConfiguration;
-<%_ } _%>
-import java.time.Instant;
-import java.time.temporal.ChronoUnit;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-/**
- * Integration tests for {@link AuditEventService}.
- */
-<%_ if (messageBroker === 'kafka') { _%>
-@EmbeddedKafka
-<%_ } _%>
-<%_ if (authenticationType === 'oauth2') { _%>
-@SpringBootTest(classes = {<%= mainClass %>.class, TestSecurityConfiguration.class})
-<%_ } else { _%>
-@SpringBootTest(classes = <%= mainClass %>.class)
-<%_ } _%>
-<%_ if (databaseType === 'sql') { _%>
-@Transactional
-<%_ } _%>
-public class AuditEventServiceIT {
-    @Autowired
-    private AuditEventService auditEventService;
-
-    @Autowired
-    private PersistenceAuditEventRepository persistenceAuditEventRepository;
-
-    @Autowired
-    private JHipsterProperties jHipsterProperties;
-
-    private PersistentAuditEvent auditEventOld;
-
-    private PersistentAuditEvent auditEventWithinRetention;
-
-    private PersistentAuditEvent auditEventNew;
-
-    @BeforeEach
-    public void init() {
-        <%_ if (databaseType === 'couchbase') { _%>
-        mockAuthentication();
-        <%_ } _%>
-        auditEventOld = new PersistentAuditEvent();
-        auditEventOld.setAuditEventDate(Instant.now().minus(jHipsterProperties.getAuditEvents().getRetentionPeriod() + 1, ChronoUnit.DAYS));
-        auditEventOld.setPrincipal("test-user-old");
-        auditEventOld.setAuditEventType("test-type");
-
-        auditEventWithinRetention = new PersistentAuditEvent();
-        auditEventWithinRetention.setAuditEventDate(Instant.now().minus(jHipsterProperties.getAuditEvents().getRetentionPeriod() - 1, ChronoUnit.DAYS));
-        auditEventWithinRetention.setPrincipal("test-user-retention");
-        auditEventWithinRetention.setAuditEventType("test-type");;
-
-        auditEventNew = new PersistentAuditEvent();
-        auditEventNew.setAuditEventDate(Instant.now());
-        auditEventNew.setPrincipal("test-user-new");
-        auditEventNew.setAuditEventType("test-type");
-    }
-
-    @Test
-    <%_ if (databaseType === 'sql') { _%>
-    @Transactional
-    <%_ } _%>
-    public void verifyOldAuditEventsAreDeleted() {
-        persistenceAuditEventRepository.deleteAll();
-        persistenceAuditEventRepository.save(auditEventOld);
-        persistenceAuditEventRepository.save(auditEventWithinRetention);
-        persistenceAuditEventRepository.save(auditEventNew);
-        <% if (databaseType === 'sql') { %>
-        persistenceAuditEventRepository.flush();
-        <% } %>
-        auditEventService.removeOldAuditEvents();
-        <% if (databaseType === 'sql') { %>
-        persistenceAuditEventRepository.flush();
-        <% } %>
-        assertThat(persistenceAuditEventRepository.findAll().size()).isEqualTo(2);
-        assertThat(persistenceAuditEventRepository.findByPrincipal("test-user-old")).isEmpty();
-        assertThat(persistenceAuditEventRepository.findByPrincipal("test-user-retention")).isNotEmpty();
-        assertThat(persistenceAuditEventRepository.findByPrincipal("test-user-new")).isNotEmpty();
-    }
-}
diff --git a/generators/server/templates/src/test/java/package/web/rest/AuditResourceIT.java.ejs b/generators/server/templates/src/test/java/package/web/rest/AuditResourceIT.java.ejs
index d20887abb9..e5d9001c0e 100644
--- a/generators/server/templates/src/test/java/package/web/rest/AuditResourceIT.java.ejs
+++ b/generators/server/templates/src/test/java/package/web/rest/AuditResourceIT.java.ejs
@@ -22,7 +22,6 @@ import <%=packageName%>.<%= mainClass %>;
 <%_ if (authenticationType === 'oauth2') { _%>
 import <%=packageName%>.config.TestSecurityConfiguration;
 <%_ } _%>
-import io.github.jhipster.config.JHipsterProperties;
 import <%=packageName%>.config.audit.AuditEventConverter;
 import <%=packageName%>.domain.PersistentAuditEvent;
 import <%=packageName%>.repository.PersistenceAuditEventRepository;
@@ -82,9 +81,6 @@ public class AuditResourceIT {
     @Autowired
     private AuditEventConverter auditEventConverter;
 
-    @Autowired
-    private JHipsterProperties jhipsterProperties;
-
     @Autowired
     private MappingJackson2HttpMessageConverter jacksonMessageConverter;
 
@@ -103,7 +99,7 @@ public class AuditResourceIT {
     public void setup() {
         MockitoAnnotations.initMocks(this);
         AuditEventService auditEventService =
-            new AuditEventService(auditEventRepository, auditEventConverter, jhipsterProperties);
+            new AuditEventService(auditEventRepository, auditEventConverter);
         AuditResource auditResource = new AuditResource(auditEventService);
         this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource)
             .setCustomArgumentResolvers(pageableArgumentResolver)
diff --git a/test/utils/expected-files.js b/test/utils/expected-files.js
index b04fcf05fd..c6a91ef765 100644
--- a/test/utils/expected-files.js
+++ b/test/utils/expected-files.js
@@ -237,7 +237,6 @@ const expectedFiles = {
         `${SERVER_TEST_SRC_DIR}com/mycompany/myapp/web/rest/UserResourceIT.java`,
         `${SERVER_TEST_SRC_DIR}com/mycompany/myapp/service/UserServiceIT.java`,
         `${SERVER_TEST_SRC_DIR}com/mycompany/myapp/service/MailServiceIT.java`,
-        `${SERVER_TEST_SRC_DIR}com/mycompany/myapp/service/AuditEventServiceIT.java`,
         `${SERVER_TEST_SRC_DIR}com/mycompany/myapp/service/mapper/UserMapperIT.java`,
         `${SERVER_TEST_SRC_DIR}com/mycompany/myapp/repository/CustomAuditEventRepositoryIT.java`
     ],