### Question:
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);  }### Answer:
@Test public void test_newRecord() { assertTrue(recordFactory.newRecord(aJsonObject()) != null); }
@Test public void test_returnsNullWhenNullJsonNode() { assertNull(recordFactory.newRecord(aJsonNull())); }
@Test public void test_callsUpdaterWhenCreatingRecord() { final JsonNode node = aJsonObject(); final Record record = recordFactory.newRecord(node); verify(updater).update(record, node); }