实例代码:
`public class TestJMockData {
@Test
public void testGeneric() {
final GeneralEntity entity = JMockData.mock(GeneralEntity.class);
Assertions.assertNotNull(entity);
}
}
class GeneralEntity{
private List<GenericEntity> rows;
public List<GenericEntity<String>> getRows() {
return rows;
}
public void setRows(List<GenericEntity<String>> rows) {
this.rows = rows;
}
}
class GenericEntity {
private T key;
public T getKey() {
return key;
}
public void setKey(T key) {
this.key = key;
}
}`
实例代码:
`public class TestJMockData {
}
class GeneralEntity{
private List<GenericEntity> rows;
}
class GenericEntity {
private T key;
}`