AddressBookServiceImpl implements AddressBookService { @Override public boolean isAddressBook(EntityId entityId) { return ADDRESS_BOOK_101_ENTITY_ID.equals(entityId) || ADDRESS_BOOK_102_ENTITY_ID.equals(entityId); }  @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 isAddressBook() { EntityId fileID = EntityId.of(0, 0, 234, EntityTypeEnum.FILE); boolean isAddressBook = addressBookService.isAddressBook(fileID); assertThat(isAddressBook).isFalse(); fileID = EntityId.of(0, 0, 101, EntityTypeEnum.FILE); isAddressBook = addressBookService.isAddressBook(fileID); assertThat(isAddressBook).isTrue(); fileID = EntityId.of(0, 0, 102, EntityTypeEnum.FILE); isAddressBook = addressBookService.isAddressBook(fileID); assertThat(isAddressBook).isTrue(); }