// When
List<Invoice> savedInvoices = newArrayList(restRepository.save(Arrays.asList(firstInvoice, secondInvoice)));
// Then
assertEquals(firstInvoice.invoiceId(), savedInvoices.get(0).invoiceId());
assertEquals(secondInvoice.invoiceId(), savedInvoices.get(1).invoiceId());
}
@Test
public void shouldCountInvoicesByQuery() throws InterruptedException {
// When