use of org.springframework.data.couchbase.domain.SubscriptionToken in project spring-data-couchbase by spring-projects.
the class CouchbaseRepositoryKeyValueIntegrationTests method subscriptionToken.
@Test
void subscriptionToken() {
SubscriptionToken st = new SubscriptionToken("id", 0, "type", "Dave Smith", "app123", "dev123", 0);
st = subscriptionTokenRepository.save(st);
st = subscriptionTokenRepository.findById(st.getId()).get();
GetResult jdkResult = couchbaseTemplate.getCouchbaseClientFactory().getDefaultCollection().get(st.getId());
assertNotEquals(0, st.getVersion());
assertEquals(jdkResult.cas(), st.getVersion());
subscriptionTokenRepository.delete(st);
}
Aggregations