Skip to content

Commit

Permalink
Fixed a code smell
Browse files Browse the repository at this point in the history
Signed-off-by: Nana-EC <[email protected]>
  • Loading branch information
Nana-EC committed Jan 8, 2021
1 parent bab2e5d commit 87b2f1a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.hedera.mirror.importer.repository;

import java.util.Optional;
import javax.annotation.Resource;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -41,7 +40,7 @@ void findByTokenIdAndAccountId() {

Assertions.assertThat(tokenAccountRepository
.findByTokenIdAndAccountId(EntityId.of("1.2.3", EntityTypeEnum.TOKEN).getId(), EntityId
.of("0.2.44", EntityTypeEnum.ACCOUNT).getId())).isEqualTo(Optional.empty());
.of("0.2.44", EntityTypeEnum.ACCOUNT).getId())).isNotPresent();
}

@Test
Expand All @@ -63,7 +62,7 @@ void findByTokenIdAndAccountIdMultipleTokensSameAccount() {

Assertions.assertThat(tokenAccountRepository
.findByTokenIdAndAccountId(EntityId.of(tokenId2, EntityTypeEnum.TOKEN).getId(), EntityId
.of(accountId2, EntityTypeEnum.ACCOUNT).getId())).isEqualTo(Optional.empty());
.of(accountId2, EntityTypeEnum.ACCOUNT).getId())).isNotPresent();
}

private TokenAccount tokenAccount(String tokenId, String accountId, long createdTimestamp) {
Expand Down

0 comments on commit 87b2f1a

Please sign in to comment.