Search in sources :

Example 6 with TimestampRange

use of com.palantir.timestamp.TimestampRange in project atlasdb by palantir.

the class LegacyTimelockServiceTest method freshTimestampsDelegatesToTimestampService.

@Test
public void freshTimestampsDelegatesToTimestampService() {
    int numTimestamps = 10;
    TimestampRange range = TimestampRange.createInclusiveRange(21L, 30L);
    when(timestampService.getFreshTimestamps(numTimestamps)).thenReturn(range);
    assertEquals(range, timelock.getFreshTimestamps(numTimestamps));
}
Also used : TimestampRange(com.palantir.timestamp.TimestampRange) Test(org.junit.Test)

Aggregations

TimestampRange (com.palantir.timestamp.TimestampRange)6 Test (org.junit.Test)6 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 InMemoryTimestampService (com.palantir.timestamp.InMemoryTimestampService)1 TimestampService (com.palantir.timestamp.TimestampService)1 JacksonDecoder (feign.jackson.JacksonDecoder)1 JacksonEncoder (feign.jackson.JacksonEncoder)1 JAXRSContract (feign.jaxrs.JAXRSContract)1