Skip to content

Commit 262bbdf

Browse files
committed
Use response conditions in test
1 parent b1861f6 commit 262bbdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/com/rabbitmq/stream/impl/OffsetTrackingTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
1414
package com.rabbitmq.stream.impl;
1515

16+
import static com.rabbitmq.stream.impl.TestUtils.ResponseConditions.ko;
17+
import static com.rabbitmq.stream.impl.TestUtils.ResponseConditions.responseCode;
1618
import static com.rabbitmq.stream.impl.TestUtils.b;
1719
import static com.rabbitmq.stream.impl.TestUtils.forEach;
1820
import static com.rabbitmq.stream.impl.TestUtils.latchAssert;
@@ -106,8 +108,7 @@ void trackAndQuery(
106108
@Test
107109
void shouldReturnNoOffsetIfNothingStoredForReference() {
108110
QueryOffsetResponse response = cf.get().queryOffset(UUID.randomUUID().toString(), stream);
109-
assertThat(response.isOk()).isFalse();
110-
assertThat(response.getResponseCode()).isEqualTo(Constants.RESPONSE_CODE_NO_OFFSET);
111+
assertThat(response).is(ko()).has(responseCode(Constants.RESPONSE_CODE_NO_OFFSET));
111112
assertThat(response.getOffset()).isEqualTo(0);
112113
}
113114

0 commit comments

Comments
 (0)