### Question:
PredefinedFields { public static String createArrayFieldNameFromCountField(String countField){ if(doesFieldNameMatchArrayCountPattern(countField)){ return countField.substring(0, countField.length() - 1); } return countField; } private  PredefinedFields(); static void ensurePredefinedFields(EntityMetadata md); static void updateArraySizes(EntityMetadata md, JsonNodeFactory factory, JsonDoc doc); static boolean isFieldObjectType(String fieldName); static boolean isFieldAnArrayCount(String fieldName, Fields metadataFields); static boolean isPredefinedField(String fieldName, Fields fields); static String createArrayFieldNameFromCountField(String countField); static String createArrayCountFieldName(String arrayFieldName); static final String OBJECTTYPE_FIELD; static final String FIELD_ARRAY_COUNT_POSTFIX; static final Path OBJECTTYPE_PATH; }### Answer:
@Test public void testCreateArrayFieldNameFromCountField_NullValue(){ assertNull(PredefinedFields.createArrayFieldNameFromCountField(null)); }
@Test public void testCreateArrayFieldNameFromCountField_NotArrayCountField(){ String nonArrayCountFieldName = "notarraycount"; assertEquals(nonArrayCountFieldName, PredefinedFields.createArrayFieldNameFromCountField(nonArrayCountFieldName)); }
@Test public void testCreateArrayFieldNameFromCountField_ArrayCountField(){ String arrayFieldName = "arrayFieldName"; String arrayCountFieldName = arrayFieldName + PredefinedFields.FIELD_ARRAY_COUNT_POSTFIX; assertEquals(arrayFieldName, PredefinedFields.createArrayFieldNameFromCountField(arrayCountFieldName)); }