Search in sources :

Example 6 with CoreTokenConfig

use of org.forgerock.openam.cts.CoreTokenConfig in project OpenAM by OpenRock.

the class TokenStrategyFactoryTest method shouldReturnCompression.

@Test
public void shouldReturnCompression() {
    // Given
    CoreTokenConfig config = mock(CoreTokenConfig.class);
    given(config.isTokenCompressed()).willReturn(true);
    // When
    Collection<BlobStrategy> strategies = factory.getStrategies(config);
    // Then
    assertThat(strategies).contains(compression);
}
Also used : CoreTokenConfig(org.forgerock.openam.cts.CoreTokenConfig) Test(org.testng.annotations.Test)

Aggregations

CoreTokenConfig (org.forgerock.openam.cts.CoreTokenConfig)6 Test (org.testng.annotations.Test)5 ArrayList (java.util.ArrayList)1 TokenIdFactory (org.forgerock.openam.cts.api.tokens.TokenIdFactory)1 JSONSerialisation (org.forgerock.openam.cts.utils.JSONSerialisation)1 TokenBlobUtils (org.forgerock.openam.cts.utils.blob.TokenBlobUtils)1 BeforeMethod (org.testng.annotations.BeforeMethod)1