@Test
void customAuthParameters()
{

    HashMap<String,Object> parameters = new HashMap<>();
    parameters.put( "list", asList( 1, 2, 3 ) );
    InternalAuthToken basic = (InternalAuthToken) custom( "foo", "bar", "baz", "my_scheme", parameters );
    Map<String,Value> expectedParameters = new HashMap<>();
    expectedParameters.put( "list", new ListValue( values( 1, 2, 3 ) ) );
    Map<String,Value> map = basic.toMap();
    assertThat( map.size(), equalTo( 5 ) );
    assertThat( map.get( "scheme" ), equalTo( (Value) new StringValue( "my_scheme" ) ) );
    assertThat( map.get( "principal" ), equalTo( (Value) new StringValue( "foo" ) ) );
    assertThat( map.get( "credentials" ), equalTo( (Value) new StringValue( "bar" ) ) );
    assertThat( map.get( "realm" ), equalTo( (Value) new StringValue( "baz" ) ) );
    assertThat( map.get( "parameters" ), equalTo( (Value) new MapValue( expectedParameters ) ) );
}