AddressBookServiceImpl implements AddressBookService { @Override public AddressBook getCurrent() { Instant now = Instant.now(); long consensusTimestamp = Utility.convertToNanosMax(now.getEpochSecond(), now.getNano()); return addressBookRepository .findLatestAddressBook(consensusTimestamp, ADDRESS_BOOK_102_ENTITY_ID.getId()) .orElseThrow(() -> new IllegalStateException("No valid address book found in DB")); }  @Override void update(FileData fileData); @Override AddressBook getCurrent(); @Override boolean isAddressBook(EntityId entityId); static final EntityId ADDRESS_BOOK_101_ENTITY_ID; static final EntityId ADDRESS_BOOK_102_ENTITY_ID; }
@Test void startupWithOtherNetwork() { mirrorProperties.setNetwork(MirrorProperties.HederaNetwork.OTHER); assertThrows(IllegalStateException.class, () -> { addressBookService.getCurrent(); }); }