catalog.loadCatalog();
}
public Object instantiateBeans(Method method) {
Object createObject;
CreateTestData testData = getAnnotation(method);
int randomSize = randomUtil.randomBetween(testData.min(), testData.max());
if (Collection.class.isAssignableFrom(method.getReturnType())) {
Collection collection = newInstance(testData.collectionType());
for (int i = 0; i < randomSize; i++) {
collection.add(instantiateBean(method));
}
createObject = collection;
} else if (Map.class.isAssignableFrom(method.getReturnType())) {
Map map = newInstance(testData.mapType());
for (int i = 0; i < randomSize; i++) {
Class<?>[] types = findReturnType(method);
map.put(instantiateType(types[0]), instantiateType(types[1]));
}
createObject = map;