### Question:
DefaultNamingStrategy extends AbstractNamingStrategy { @Override public String getPropertyName(String columnName, EntityType entityType) { String normalized = normalizeJavaName(columnName); return normalizeJavaName(normalized.substring(0, 1).toLowerCase(Locale.ENGLISH) + toCamelCase(normalized.substring(1))); } DefaultNamingStrategy(); @Override String getClassName(String tableName); @Override String getDefaultAlias(EntityType entityType); @Override String getDefaultVariableName(EntityType entityType); @Override String getForeignKeysVariable(EntityType entityType); @Override String getPrimaryKeysVariable(EntityType entityType); @Override String getPropertyName(String columnName, EntityType entityType); @Override String getPropertyNameForForeignKey(String fkName, EntityType entityType); @Override String getPropertyNameForInverseForeignKey(String fkName, EntityType entityType); @Override String getPropertyNameForPrimaryKey(String pkName, EntityType entityType);  }### Answer:
@Test public void getPropertyName() { assertEquals("a", namingStrategy.getPropertyName("a", entityModel)); assertEquals("whileCol", namingStrategy.getPropertyName("while", entityModel)); assertEquals("name", namingStrategy.getPropertyName("name", entityModel)); assertEquals("userId", namingStrategy.getPropertyName("user_id", entityModel)); assertEquals("accountEventId", namingStrategy.getPropertyName("accountEvent_id", entityModel)); assertEquals("_123abc", namingStrategy.getPropertyName("123abc", entityModel)); assertEquals("_123Abc", namingStrategy.getPropertyName("123 abc", entityModel)); assertEquals("_123AbcDef", namingStrategy.getPropertyName("#123#abc#def", entityModel)); assertEquals("newLine", namingStrategy.getPropertyName("new line", entityModel)); assertEquals("classCol", namingStrategy.getPropertyName("class", entityModel)); assertEquals("classCol", namingStrategy.getPropertyName("Class", entityModel)); }
@Test public void getPropertyName_with_dashes() { assertEquals("aFoobar", namingStrategy.getPropertyName("A-FOOBAR" , entityModel)); assertEquals("aFoobar", namingStrategy.getPropertyName("A_FOOBAR" , entityModel)); }
@Test public void getPropertyName_for_column_with_spaces() { assertEquals("userId", namingStrategy.getPropertyName("user id", entityModel)); }
@Test public void spaces() { assertEquals("a_b", namingStrategy.getPropertyName("a b", entityModel)); }
@Test public void validName() { assertEquals("8FRecord", namingStrategy.normalizeColumnName("8FRecord")); assertEquals("_8FRecord", namingStrategy.getPropertyName("8FRecord", entityModel)); }