* @return a Stub object
* @throws QuickFixException
*/
protected Stub<?> getStub(Object object) throws QuickFixException {
if (object instanceof Map) {
Invocation invocation = getInvocation(((Map<?, ?>) object).get("method"));
@SuppressWarnings("rawtypes")
Class retType = invocation.getReturnType();
@SuppressWarnings("unchecked")
List<Answer<Object>> answers = getAnswers(((Map<?, ?>) object).get("answers"), retType);
return new Stub<>(invocation, answers);
}
return null;