Settare il valore ID dell'entità passata come parametro chiamando una dao.insert
doAnswer(invocation -> {
Object[] args = invocation.getArguments();
((Masterbook) args[0]).setId(1L);
return 1L;
}).when(masterbookDAO).insert(any(), any());
verify(configurationDAO, times(1)).insert(any());
assertThat(itemCodes, containsInAnyOrder(itemCode));
assertThat(confOnDb, hasProperty("EnrichmentEdit", not(empty())));
assertThat(confOnDb.getEnrichmentEdit(), is(notNullValue()))
assertThat(results.getBookmark(), is(in(List.of(FactoryUtils.getTagRuleBookmark1().getBookmark(), FactoryUtils.getTagRuleBookmark2().getBookmark()))));
assertThat(set, everyItem(is(oneOf("A", "B", "C"))));
assertThat(metadataPropertyNames, everyItem(is(in(List.of("itemCode", "title", "brandId")))));