### Question:
JpaUtils { public static String getCustomChangelogTableName(String jpaEntityProviderFactoryId) { String upperCased = jpaEntityProviderFactoryId.toUpperCase(); upperCased = upperCased.replaceAll("-", "_"); upperCased = upperCased.replaceAll("[^A-Z_]", ""); return "DATABASECHANGELOG_" + upperCased.substring(0, Math.min(10, upperCased.length())); }  static String getTableNameForNativeQuery(String tableName, EntityManager em); static EntityManagerFactory createEntityManagerFactory(KeycloakSession session, String unitName, Map<String, Object> properties, boolean jta); static List<Class<?>> getProvidedEntities(KeycloakSession session); static String getCustomChangelogTableName(String jpaEntityProviderFactoryId); static final String HIBERNATE_DEFAULT_SCHEMA; }### Answer:
@Test public void testConvertTableName() { Assert.assertEquals("DATABASECHANGELOG_FOO", JpaUtils.getCustomChangelogTableName("foo")); Assert.assertEquals("DATABASECHANGELOG_FOOBAR", JpaUtils.getCustomChangelogTableName("foo123bar")); Assert.assertEquals("DATABASECHANGELOG_FOO_BAR", JpaUtils.getCustomChangelogTableName("foo_bar568")); Assert.assertEquals("DATABASECHANGELOG_FOO_BAR_C", JpaUtils.getCustomChangelogTableName("foo-bar-c568")); Assert.assertEquals("DATABASECHANGELOG_EXAMPLE_EN", JpaUtils.getCustomChangelogTableName("example-entity-provider")); }