@Test
void testNetworkAddressBookUpdate() throws Exception {

    // given
    byte[] fileContents = UPDATED.toByteArray();
    var fileUpdate = FileUpdateTransactionBody.newBuilder()
            .setFileID(ADDRESS_BOOK_FILE_ID)
            .setContents(ByteString.copyFrom(fileContents))
            .build();
    Transaction transaction = buildTransaction(builder -> builder.setFileUpdate(fileUpdate));
    // when
    EntityId entityId = EntityId.of(ADDRESS_BOOK_FILE_ID);
    doReturn(EntityId.of(ADDRESS_BOOK_FILE_ID)).when(transactionHandler).getEntity(any());
    pubSubRecordItemListener.onItem(new RecordItem(transaction.toByteArray(), DEFAULT_RECORD_BYTES));
    // then
    FileData fileData = new FileData(100L, fileContents, EntityId
            .of(ADDRESS_BOOK_FILE_ID), TransactionTypeEnum.FILEUPDATE
            .getProtoId());
    verify(addressBookService).update(fileData);
}