@Test
public void testLeadingAndTrailingZeros() throws JoseException
{
byte[] rawInputBytes = new byte[] {0,0,111,16,51,98,-4,0,-72,9,-111,60,41,-66,94,0};
JsonWebKey jwk = JsonWebKey.Factory.newJwk(new AesKey(rawInputBytes));
String json = jwk.toJson(INCLUDE_SYMMETRIC);
JsonWebKey jwkFromJson = JsonWebKey.Factory.newJwk(json);
byte[] encoded = jwkFromJson.getKey().getEncoded();
assertThat(rawInputBytes.length, is(equalTo(encoded.length)));