use of com.radixdlt.api.core.openapitools.model.ConstructionDeriveRequestMetadataExitingUnstakes in project radixdlt by radixdlt.
the class ConstructionDeriveHandlerTest method derive_exiting_unstakes_should_return_entity_identifier.
@Test
public void derive_exiting_unstakes_should_return_entity_identifier() throws CoreApiException {
// Arrange
var publicKey = PrivateKeys.ofNumeric(2).getPublicKey();
var validatorKey = PrivateKeys.ofNumeric(3).getPublicKey();
long epochUnlock = 236L;
start();
// Act
var request = new ConstructionDeriveRequest().networkIdentifier(networkIdentifier()).publicKey(coreModelMapper.publicKey(publicKey)).metadata(new ConstructionDeriveRequestMetadataExitingUnstakes().validator(coreModelMapper.entityIdentifier(validatorKey)).epochUnlock(epochUnlock).type("ExitingUnstakes"));
var response = sut.handleRequest(request);
// Assert
assertThat(response.getEntityIdentifier()).isEqualTo(coreModelMapper.entityIdentifierExitingStake(REAddr.ofPubKeyAccount(publicKey), validatorKey, epochUnlock));
}
Aggregations