Parameter<PagingContext> pagingContextParam = new Parameter<PagingContext>(
"",
PagingContext.class,
null,
false,
new PagingContext(0, 10),
Parameter.ParamType.PAGING_CONTEXT_PARAM,
false,
new AnnotationSet(new Annotation[]{}));
getAllParams.add(pagingContextParam);
Map<String, String> getAllContextParams = new HashMap<String, String>();
getAllContextParams.put("start", "33");
getAllContextParams.put("count", "444");
List<Parameter<?>> finderParams = new ArrayList<Parameter<?>>();
finderParams.add(pagingContextParam);
Parameter<Integer> requiredIntParam = new Parameter<Integer>(
"required",
Integer.class,
new IntegerDataSchema(),
false,
null,
Parameter.ParamType.QUERY,
true,
new AnnotationSet(new Annotation[]{}));
finderParams.add(requiredIntParam);
Parameter<String> optionalStringParam = new Parameter<String>(
"optional",
String.class,
new StringDataSchema(),
true,
null,
Parameter.ParamType.QUERY,
true,
new AnnotationSet(new Annotation[]{}));
finderParams.add(optionalStringParam);
Map<String, String> finderContextParams = new HashMap<String, String>();
finderContextParams.put("start", "33");
finderContextParams.put("count", "444");
finderContextParams.put("required", "777");
finderContextParams.put("optional", null);
Map<String, String> finderContextParamsWithOptionalString = new HashMap<String, String>(finderContextParams);
finderContextParamsWithOptionalString.put("optional", "someString");
List<Parameter<?>> finderWithAssocKeyParams = new ArrayList<Parameter<?>>();
finderWithAssocKeyParams.add(new Parameter<String>(
"string1",
String.class,
new StringDataSchema(),
false,
null,
Parameter.ParamType.ASSOC_KEY_PARAM,
true,
new AnnotationSet(new Annotation[]{})));
return new Object[][]
{
{
getAllParams,
getAllContextParams,
null,
new Object[]{new PagingContext(33, 444)}
},
{
finderParams,
finderContextParams,
null,
new Object[]{new PagingContext(33, 444), new Integer(777), null}
},
{
finderParams,
finderContextParamsWithOptionalString,
null,
new Object[]{new PagingContext(33, 444), new Integer(777), "someString"}
},
{
finderWithAssocKeyParams,
null,
new PathKeysImpl().append("string1", "testString"),