### Question:
SSZSerializer implements BytesSerializer, SSZVisitorHandler<SerializerResult> { @Override public <C> byte[] encode(@Nullable C inputObject, Class<? extends C> inputClazz) { return visit(inputObject, inputClazz).getSerializedBody().getArrayUnsafe(); } SSZSerializer(SSZVisitorHost sszVisitorHost,
      TypeResolver typeResolver); @Override byte[] encode(@Nullable C inputObject, Class<? extends C> inputClazz); @Override SerializerResult visitAny(SSZType sszType, Object value); @Override SerializerResult visitList(SSZListType descriptor, Object listValue, int startIdx, int len); C decode(byte[] data, Class<? extends C> clazz);  }### Answer:
@Test(expected = NullPointerException.class) public void nullFixedSizeFieldTest() { AttestationRecord expected3 = new AttestationRecord( 123, Collections.emptyList(), null, new Bitfield(BytesValue.fromHexString("abcdef45").getArrayUnsafe()), null, 12412L, 12400L, DEFAULT_SIG); sszSerializer.encode(expected3); }
@Test(expected = NullPointerException.class) public void nullListTest() { AttestationRecord expected4 = new AttestationRecord( 123, null, DEFAULT_HASH, new Bitfield(BytesValue.fromHexString("abcdef45").getArrayUnsafe()), DEFAULT_HASH, 12412L, 12400L, DEFAULT_SIG); sszSerializer.encode(expected4); }