@Test public void testToStringArray() { List<Field> fields = new ArrayList<>(); Field fieldName = new Field(); fieldName.setName("givenName"); Field field2Location = new Field(); field2Location.setName("l"); fields.add(fieldName); fields.add(field2Location); String[] st = new ApacheAPIConverter().toStringArray(fields); assertTrue(st[0].equals("givenName")); assertTrue(st[1].equals("l")); }
String[] toStringArray(List<Field> entities) { if (entities == null || entities.isEmpty()) { String[] result = new String[1]; result[0] = "*"; return result; } String[] result = new String[entities.size()]; for (int i = 0; i < entities.size(); i++) { result[i] = entities.get(i).getName(); } return result; }
ApacheAPIConverter { String[] toStringArray(List<Field> entities) { if (entities == null || entities.isEmpty()) { String[] result = new String[1]; result[0] = "*"; return result; } String[] result = new String[entities.size()]; for (int i = 0; i < entities.size(); i++) { result[i] = entities.get(i).getName(); } return result; } }
ApacheAPIConverter { String[] toStringArray(List<Field> entities) { if (entities == null || entities.isEmpty()) { String[] result = new String[1]; result[0] = "*"; return result; } String[] result = new String[entities.size()]; for (int i = 0; i < entities.size(); i++) { result[i] = entities.get(i).getName(); } return result; }  }
ApacheAPIConverter { String[] toStringArray(List<Field> entities) { if (entities == null || entities.isEmpty()) { String[] result = new String[1]; result[0] = "*"; return result; } String[] result = new String[entities.size()]; for (int i = 0; i < entities.size(); i++) { result[i] = entities.get(i).getName(); } return result; }  Modification toModification(ModificationDetails modificationDetails); }
ApacheAPIConverter { String[] toStringArray(List<Field> entities) { if (entities == null || entities.isEmpty()) { String[] result = new String[1]; result[0] = "*"; return result; } String[] result = new String[entities.size()]; for (int i = 0; i < entities.size(); i++) { result[i] = entities.get(i).getName(); } return result; }  Modification toModification(ModificationDetails modificationDetails);  }