### Question:
TupleEntry { public int getInteger( Comparable fieldName ) { return (Integer) getObject( fieldName, int.class ); } TupleEntry(); @ConstructorProperties({"isUnmodifiable"})  TupleEntry( boolean isUnmodifiable ); @ConstructorProperties({"fields"})  TupleEntry( Fields fields ); @ConstructorProperties({"fields", "isUnmodifiable"})  TupleEntry( Fields fields, boolean isUnmodifiable ); @ConstructorProperties({"fields", "tuple", "isUnmodifiable"})  TupleEntry( Fields fields, Tuple tuple, boolean isUnmodifiable ); @ConstructorProperties({"fields", "tuple"})  TupleEntry( Fields fields, Tuple tuple ); @ConstructorProperties({"tupleEntry"})  TupleEntry( TupleEntry tupleEntry ); @ConstructorProperties({"tuple"})  TupleEntry( Tuple tuple ); static Tuple select( Fields selector, TupleEntry... entries ); boolean isUnmodifiable(); Fields getFields(); boolean hasTypes(); Tuple getTuple(); Tuple getTupleCopy(); Tuple getCoercedTuple( Type[] types ); Tuple getCoercedTuple( Type[] types, Tuple into ); void setTuple( Tuple tuple ); void setCanonicalTuple( Tuple tuple ); void setCanonicalValues( Object[] values ); void setCanonicalValues( Object[] values, int offset, int length ); int size(); Object getObject( int pos ); Object getObject( int pos, Type type ); Object getObject( Comparable fieldName ); Object getObject( Comparable fieldName, Type type ); void setRaw( int pos, Object value ); void setRaw( Comparable fieldName, Object value ); void setObject( Comparable fieldName, Object value ); void setBoolean( Comparable fieldName, boolean value ); void setShort( Comparable fieldName, short value ); void setInteger( Comparable fieldName, int value ); void setLong( Comparable fieldName, long value ); void setFloat( Comparable fieldName, float value ); void setDouble( Comparable fieldName, double value ); void setString( Comparable fieldName, String value ); String getString( Comparable fieldName ); float getFloat( Comparable fieldName ); double getDouble( Comparable fieldName ); int getInteger( Comparable fieldName ); long getLong( Comparable fieldName ); short getShort( Comparable fieldName ); boolean getBoolean( Comparable fieldName ); TupleEntry selectEntry( Fields selector ); TupleEntry selectEntryCopy( Fields selector ); Tuple selectTuple( Fields selector ); Tuple selectTupleCopy( Fields selector ); Tuple selectInto( Fields selector, Tuple tuple ); void setTuple( Fields selector, Tuple tuple ); void set( TupleEntry tupleEntry ); TupleEntry appendNew( TupleEntry entry ); @Override boolean equals( Object object ); @Override int hashCode(); @Override String toString(); Iterable<T> asIterableOf( final Class<T> type ); Iterable<String[]> asPairwiseIterable( ); static final TupleEntry NULL; }### Answer:
@Test(expected = TupleException.class) public void testCoerceCanonicalUnknownFail() { Tuple tuple = new Tuple( 1 ); TupleEntry results = new TupleEntry( Fields.UNKNOWN, tuple ); assertEquals( 1, results.getInteger( 1 ) ); }