@Test public void test_returnsNullWhenNullJsonNode() { assertNull(recordFactory.newRecord(aJsonNull())); }
public Record newRecord(JsonNode node) { if (!node.isNullNode()) { final Record record = new Record(); updater.update(record, node); return record; } else { return null; } }
RecordFactory { public Record newRecord(JsonNode node) { if (!node.isNullNode()) { final Record record = new Record(); updater.update(record, node); return record; } else { return null; } } }
RecordFactory { public Record newRecord(JsonNode node) { if (!node.isNullNode()) { final Record record = new Record(); updater.update(record, node); return record; } else { return null; } } @Inject  RecordFactory(RecordJSONUpdater updater); }
RecordFactory { public Record newRecord(JsonNode node) { if (!node.isNullNode()) { final Record record = new Record(); updater.update(record, node); return record; } else { return null; } } @Inject  RecordFactory(RecordJSONUpdater updater); Record newRecord(JsonNode node); Record[] newRecords(List<JsonNode> nodes); }
RecordFactory { public Record newRecord(JsonNode node) { if (!node.isNullNode()) { final Record record = new Record(); updater.update(record, node); return record; } else { return null; } } @Inject  RecordFactory(RecordJSONUpdater updater); Record newRecord(JsonNode node); Record[] newRecords(List<JsonNode> nodes);  }