public function testDecodeUnreservedCharacters($char)
{
$percentEncoded = '%' . bin2hex($char);
// Add encoded reserved characters to test that those are not decoded and include the percent-encoded
// unreserved character both in lower and upper case to test the decoding is case-insensitive.
$encodedChars = $percentEncoded . '%2F%5B' . strtoupper($percentEncoded);
$uri = (new Uri())->withPath("/{$encodedChars}")->withQuery($encodedChars);
$this->assertSame("/{$encodedChars}?{$encodedChars}", (string) $uri, 'Not normalized automatically beforehand');
$normalizedUri = UriNormalizer::normalize($uri, UriNormalizer::DECODE_UNRESERVED_CHARACTERS);
$this->assertInstanceOf('Psr\\Http\\Message\\UriInterface', $normalizedUri);
$this->assertSame("/{$char}%2F%5B{$char}?{$char}%2F%5B{$char}", (string) $normalizedUri);
}