### Question:
Tuple { public Object get(int index) { return values[index]; } private  Tuple(Object... values);  Tuple(int size); static Tuple of(Object... values); static Tuple fromStruct(Object struct); int size(); Object get(int index); void set(int index, T value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testOutOfBoundException() { Tuple tuple = new Tuple(0); boolean exceptionRaised = false; try { tuple.get(4); } catch (Exception e) { exceptionRaised = true; System.out.println("Exception catched : " + e.getMessage()); } assertTrue("Exception must have been thrown", exceptionRaised); }
@Test public void testCallTuple() { Tuple ret = null; try { ret = proxy.<Tuple>call("info", "42", 42, true).get(); } catch (Exception e) { fail("Call must be successful : " + e.getMessage()); } String str = null; Integer i = null; Boolean b = null; try { str = (String) ret.get(0); } catch (Exception e) { fail("Exception must not be thrown : " + e.getMessage()); } try { i = (Integer) ret.get(1); } catch (Exception e) { fail("Exception must not be thrown : " + e.getMessage()); } try { b = (Boolean) ret.get(2); } catch (Exception e) { fail("Exception must not be thrown : " + e.getMessage()); } assertEquals("42", str); assertEquals(42, i.intValue()); assertTrue(b); }