@Override
    public byte[] deserialize(Asn1ObjectInputStream in) {
        final int padBits = in.read();
        if (padBits != 0) {
            throw new Asn1Exception("Can only convert full octets bit strings");
        }
        return in.readRemaining();
    }
@Test
    public void shouldThrowExceptionWhenDeserializeNotFullOctects() {
        thrown.expect(Asn1Exception.class);
        thrown.expectMessage("Can only convert full octets bit strings");
        deserialize(new BitStringToByteArrayConverter(), byte[].class, new byte[] { 1, 1, 2 });
    }