The following example test fails with a CCE:
public interface GenericInterface<T> { <S extends T> S save(S entity); }
public interface ConcreteInterface extends GenericInterface<String> {}
@Test
public void cascadingFromGenericMethodWhoseTypeParameterExtendsAnother(@Mocked ConcreteInterface mock)
{
String value = "test";
String saved = mock.save(value);
assertNull(saved);
}
The following example test fails with a CCE: