### Question:
Neo4jPackV2 extends Neo4jPackV1 { @Override public Neo4jPack.Packer newPacker( PackOutput output ) { return new PackerV2( output ); }  @Override Neo4jPack.Packer newPacker( PackOutput output ); @Override Neo4jPack.Unpacker newUnpacker( PackInput input ); @Override long version(); static final long VERSION; static final byte POINT_2D; static final int POINT_2D_SIZE; static final byte POINT_3D; static final int POINT_3D_SIZE; static final byte DATE; static final int DATE_SIZE; static final byte TIME; static final int TIME_SIZE; static final byte LOCAL_TIME; static final int LOCAL_TIME_SIZE; static final byte LOCAL_DATE_TIME; static final int LOCAL_DATE_TIME_SIZE; static final byte DATE_TIME_WITH_ZONE_OFFSET; static final int DATE_TIME_WITH_ZONE_OFFSET_SIZE; static final byte DATE_TIME_WITH_ZONE_NAME; static final int DATE_TIME_WITH_ZONE_NAME_SIZE; static final byte DURATION; static final int DURATION_SIZE; }### Answer:
@Test public void shouldFailToUnpack2DPointWithIncorrectCoordinate() throws IOException { Neo4jPackV2 neo4jPack = new Neo4jPackV2(); PackedOutputArray output = new PackedOutputArray(); Neo4jPack.Packer packer = neo4jPack.newPacker( output ); packer.packStructHeader( 3, Neo4jPackV2.POINT_2D ); packer.pack( intValue( WGS84.getCode() ) ); packer.pack( doubleValue( 42.42 ) ); try { unpack( output ); fail( "Exception expected" ); } catch ( UncheckedIOException ignore ) { } }
@Test public void shouldFailToUnpack3DPointWithIncorrectCoordinate() throws IOException { Neo4jPackV2 neo4jPack = new Neo4jPackV2(); PackedOutputArray output = new PackedOutputArray(); Neo4jPack.Packer packer = neo4jPack.newPacker( output ); packer.packStructHeader( 4, Neo4jPackV2.POINT_3D ); packer.pack( intValue( Cartesian.getCode() ) ); packer.pack( doubleValue( 1.0 ) ); packer.pack( doubleValue( 100.1 ) ); try { unpack( output ); fail( "Exception expected" ); } catch ( UncheckedIOException ignore ) { } }