### Question:
DefaultTypeVariable implements TypeVariable<D> { @Override public String toString() { return toString(this); } DefaultTypeVariable(D declaration, String name, Type[] bounds); D getGenericDeclaration(); String getName(); Type[] getBounds(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static String toString(TypeVariable<?> type); static String toString(TypeVariable<?> type, ClassSerializer serializer);  }### Answer:
@Test public void toStringWithNoBounds() { TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T", null); assertEquals("T", typeVariable.toString()); }
@Test public void toStringWithSingleBound() { TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T", new Type[] {Number.class}); assertEquals("T extends java.lang.Number", typeVariable.toString()); }
@Test public void toStringWithMultipleBounds() { TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T", new Type[] {Number.class, Comparable.class}); assertEquals("T extends java.lang.Number & java.lang.Comparable", typeVariable.toString()); }