@Test
void create() throws Exception {

    AccountInfo.Builder accountInfo = accountInfo();
    write(accountInfo.build());
    migration.migrate(new FlywayContext());
    Assertions.assertThat(entityRepository.findById(EntityId.of(accountId).getId()))
            .get()
            .returns(accountInfo.getAutoRenewPeriod().getSeconds(), from(Entities::getAutoRenewPeriod))
            .returns(Utility.protobufKeyToHexIfEd25519OrNull(accountInfo.getKey()
                    .toByteArray()), from(Entities::getEd25519PublicKeyHex))
            .returns(Utility.timeStampInNanos(accountInfo.getExpirationTime()), from(Entities::getExpiryTimeNs))
            .returns(accountInfo.getKey().toByteArray(), from(Entities::getKey));
}