use of com.bakdata.conquery.models.auth.apitoken.ApiTokenData in project conquery by bakdata.
the class SerializationTests method testApiTokenData.
@Test
public void testApiTokenData() throws JSONException, IOException {
final CharArrayBuffer buffer = new CharArrayBuffer(5);
buffer.append("testtest");
final ApiToken apiToken = new ApiToken(buffer);
final ApiTokenData apiTokenData = new ApiTokenData(UUID.randomUUID(), apiToken.hashToken(), "tokenName", new UserId("tokenUser"), LocalDate.now(), LocalDate.now().plus(1, ChronoUnit.DAYS), EnumSet.of(Scopes.DATASET), STORAGE);
SerializationTestUtil.forType(ApiTokenData.class).injectables(STORAGE).test(apiTokenData);
}
Aggregations