diff --git a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt index 29d10e9a16..09d6f7e39b 100644 --- a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt @@ -47,6 +47,7 @@ import org.junit.Test import org.junit.rules.ExpectedException import org.junit.rules.ExternalResource import java.time.Duration +import java.time.Instant import java.time.LocalDate import java.time.ZoneOffset import java.time.temporal.ChronoUnit @@ -1609,7 +1610,12 @@ abstract class VaultQueryTestsBase : VaultQueryParties { println("$index : $any") } assertThat(results.otherResults.size).isEqualTo(402) - assertThat(results.otherResults.last()).isEqualTo(200L) + val instants = results.otherResults.filter { it is Instant }.map { it as Instant } + assertThat(instants).isSorted + val longs = results.otherResults.filter { it is Long }.map { it as Long } + assertThat(longs.size).isEqualTo(201) + assertThat(instants.size).isEqualTo(201) + assertThat(longs.sum()).isEqualTo(20100L) } }