ArgumentServices { public void checkType(Object object, Type paramType) throws JsonUnmarshallingException { Class cls; if (ParameterizedType.class.isInstance(paramType)) { cls = (Class) ((ParameterizedType) paramType).getRawType(); } else if (Class.class.isInstance(paramType)) { cls = (Class) paramType; } else { throw new JsonUnmarshallingException(object + " is not instance of " + paramType); } checkClass(object, cls); }  List<String> getJsonParameters(Object[] parameters, Annotation[][] annotationss); IJsonMarshaller getIJsonMarshallerInstance(Class<? extends IJsonMarshaller> cls); String getJsonResultFromSpecificMarshaller(JsonMarshaller jm, Object result); String getJsonResultFromSpecificMarshallerIterable(Iterable list, IJsonMarshaller marshaller); List getJavaResultFromSpecificUnmarshallerIterable(String json, IJsonMarshaller marshaller); Map getJavaResultFromSpecificUnmarshallerMap(String json, IJsonMarshaller marshaller); void checkType(Object object, Type paramType);  }
@Test(expected = JsonUnmarshallingException.class) public void checkTypeOtherTest() throws JsonUnmarshallingException { System.out.println("checkType"); instance.checkType(mock(Result.class), mock(Type.class)); }
@Test(expected = JsonUnmarshallingException.class) public void testCheckTypeFail() throws JsonUnmarshallingException { System.out.println("checkType"); WildcardType obj = mock(WildcardType.class); instance.checkType(obj, (Type) String.class); }