### Question:
DefaultWildcardType implements WildcardType { @Override public String toString() { return toString(this); } DefaultWildcardType(Type[] upperBounds, Type[] lowerBounds); Type[] getUpperBounds(); Type[] getLowerBounds(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static String toString(WildcardType type); static String toString(WildcardType type, ClassSerializer serializer);  }### Answer:
@Test public void toStringWithNoBounds() { WildcardType wildcardType = new DefaultWildcardType(null, null); assertEquals("?", wildcardType.toString()); }
@Test public void toStringWithSingleUpperBound() { WildcardType wildcardType = new DefaultWildcardType(new Type[] {Number.class}, null); assertEquals("? extends java.lang.Number", wildcardType.toString()); }
@Test public void toStringWithMultipleUpperBounds() { WildcardType wildcardType = new DefaultWildcardType(new Type[] {Number.class, Comparable.class}, null); assertEquals("? extends java.lang.Number & java.lang.Comparable", wildcardType.toString()); }
@Test public void toStringWithSingleLowerBound() { WildcardType wildcardType = new DefaultWildcardType(null, new Type[] {Integer.class}); assertEquals("? super java.lang.Integer", wildcardType.toString()); }
@Test public void toStringWithMultipleLowerBound() { WildcardType wildcardType = new DefaultWildcardType(null, new Type[] {Integer.class, Number.class}); assertEquals("? super java.lang.Integer & java.lang.Number", wildcardType.toString()); }