### Question:
SPPDecoder implements MALDecoder { @Override public Element decodeNullableElement(final Element element) throws IllegalArgumentException, MALException { return isNull() ? null : decodeElement(element); } SPPDecoder(final InputStream inputStream, final Map properties); @Override Boolean decodeBoolean(); @Override Boolean decodeNullableBoolean(); @Override Float decodeFloat(); @Override Float decodeNullableFloat(); @Override Double decodeDouble(); @Override Double decodeNullableDouble(); @Override Byte decodeOctet(); @Override Byte decodeNullableOctet(); @Override UOctet decodeUOctet(); @Override UOctet decodeNullableUOctet(); @Override Short decodeShort(); @Override Short decodeNullableShort(); @Override UShort decodeUShort(); @Override UShort decodeNullableUShort(); @Override Integer decodeInteger(); @Override Integer decodeNullableInteger(); @Override UInteger decodeUInteger(); @Override UInteger decodeNullableUInteger(); @Override Long decodeLong(); @Override Long decodeNullableLong(); @Override ULong decodeULong(); @Override ULong decodeNullableULong(); @Override String decodeString(); @Override String decodeNullableString(); @Override Blob decodeBlob(); @Override Blob decodeNullableBlob(); @Override Duration decodeDuration(); @Override Duration decodeNullableDuration(); @Override FineTime decodeFineTime(); @Override FineTime decodeNullableFineTime(); @Override Identifier decodeIdentifier(); @Override Identifier decodeNullableIdentifier(); @Override Time decodeTime(); @Override Time decodeNullableTime(); @Override URI decodeURI(); @Override URI decodeNullableURI(); @Override Element decodeElement(final Element element); @Override Element decodeNullableElement(final Element element); @Override Attribute decodeAttribute(); @Override Attribute decodeNullableAttribute(); @Override MALListDecoder createListDecoder(final List list);  }### Answer:
@Test public void testDecodeNullableElement1() throws Exception { newBuffer(new byte[]{0}); Element e = new UShort(); Element ret = decoder.decodeNullableElement(e); assertEquals(null, ret); assertNotSame(e, ret); }
@Test public void testDecodeNullableElement2() throws Exception { newBuffer(new byte[]{ (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0 }); Element e1 = new Blob(new byte[]{}); Element ret1 = decoder.decodeNullableElement(e1); assertEquals(e1, ret1); assertNotSame(e1, ret1); Element e2 = new ULong(); Element ret2 = decoder.decodeNullableElement(e2); assertEquals(null, ret2); assertNotSame(e2, ret2); Element e3 = new Identifier(); Element ret3 = decoder.decodeNullableElement(e3); assertEquals(null, ret3); assertNotSame(e3, ret3); Element e4 = new Union(new Integer(4711)); Element ret4 = decoder.decodeNullableElement(e4); assertEquals(new Union(new Integer(0)), ret4); assertNotSame(e4, ret4); }