How to use method of org.easymock.internal.MethodSerializationWrapper class

Best Easymock code snippet using org.easymock.internal.MethodSerializationWrapper.

Run Easymock automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

copy
1/*
2 * #%L
3 * BroadleafCommerce Framework
4 * %%
5 * Copyright (C) 2009 - 2021 Broadleaf Commerce
6 * %%
7 * Licensed under the Broadleaf Fair Use License Agreement, Version 1.0
8 * (the "Fair Use License" located  at http://license.broadleafcommerce.org/fair_use_license-1.0.txt)
9 * unless the restrictions on use therein are violated and require payment to Broadleaf in which case
10 * the Broadleaf End User License Agreement (EULA), Version 1.1
11 * (the "Commercial License" located at http://license.broadleafcommerce.org/commercial_license-1.1.txt)
12 * shall apply.
13 * 
14 * Alternatively, the Commercial License may be replaced with a mutually agreed upon license (the "Custom License")
15 * between you and Broadleaf Commerce. You may not use this file except in compliance with the applicable license.
16 * #L%
17 */
18package org.broadleafcommerce.core.offer.service;
19import com.thoughtworks.xstream.XStream;
20import java.io.File;
21import java.util.Scanner;
22import org.junit.Assert;
23import org.junit.Test;
24public class TestOfferServiceUtilitiesImplPanktiGen {
25    static XStream xStream = new XStream();
26
27    private <T> T deserializeObject(String serializedObjectString) {
28        return (T) xStream.fromXML(serializedObjectString);
29    }
30
31    private <T> T deserializeObject(File serializedObjectFile) throws Exception {
32        Scanner scanner = new Scanner(serializedObjectFile);
33        String serializedObjectString = scanner.useDelimiter("\\A").next();
34        return (T) xStream.fromXML(serializedObjectString);
35    }
36
37    @Test
38    public void testFindRelatedQualifierRoot1() throws Exception {
39        String receivingObjectStr = 
40        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
41        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
42        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
43        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
44        "  </promotableItemFactory>" +
45        "  <offerDao class=\"dynamic-proxy\">" +
46        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
47        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
48        "      <org.easymock.internal.ObjectMethodsFilter>" +
49        "        <default>" +
50        "          <delegate>" +
51        "            <control>" +
52        "              <state class=\"org.easymock.internal.ReplayState\">" +
53        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
54        "                  <behaviorLists>" +
55        "                    <org.easymock.internal.UnorderedBehavior>" +
56        "                      <results>" +
57        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
58        "                          <expectedInvocation>" +
59        "                            <invocation serialization=\"custom\">" +
60        "                              <org.easymock.internal.Invocation>" +
61        "                                <default>" +
62        "                                  <arguments/>" +
63        "                                  <currentCaptures class=\"list\"/>" +
64        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
65        "                                </default>" +
66        "                                <org.easymock.internal.MethodSerializationWrapper>" +
67        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
68        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
69        "                                  <parameterTypeNames/>" +
70        "                                </org.easymock.internal.MethodSerializationWrapper>" +
71        "                              </org.easymock.internal.Invocation>" +
72        "                            </invocation>" +
73        "                            <matchers/>" +
74        "                          </expectedInvocation>" +
75        "                          <results>" +
76        "                            <callCount>0</callCount>" +
77        "                            <ranges>" +
78        "                              <org.easymock.internal.Range>" +
79        "                                <minimum>0</minimum>" +
80        "                                <maximum>2147483647</maximum>" +
81        "                              </org.easymock.internal.Range>" +
82        "                            </ranges>" +
83        "                            <results>" +
84        "                              <org.easymock.internal.Result>" +
85        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
86        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
87        "                              </org.easymock.internal.Result>" +
88        "                            </results>" +
89        "                          </results>" +
90        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
91        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
92        "                          <expectedInvocation>" +
93        "                            <invocation serialization=\"custom\">" +
94        "                              <org.easymock.internal.Invocation>" +
95        "                                <default>" +
96        "                                  <arguments/>" +
97        "                                  <currentCaptures class=\"list\"/>" +
98        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
99        "                                </default>" +
100        "                                <org.easymock.internal.MethodSerializationWrapper>" +
101        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
102        "                                  <methodName>createFulfillmentGroupAdjustment</methodName>" +
103        "                                  <parameterTypeNames/>" +
104        "                                </org.easymock.internal.MethodSerializationWrapper>" +
105        "                              </org.easymock.internal.Invocation>" +
106        "                            </invocation>" +
107        "                            <matchers/>" +
108        "                          </expectedInvocation>" +
109        "                          <results>" +
110        "                            <callCount>0</callCount>" +
111        "                            <ranges>" +
112        "                              <org.easymock.internal.Range reference=\"../../../../org.easymock.internal.ExpectedInvocationAndResults/results/ranges/org.easymock.internal.Range\"/>" +
113        "                            </ranges>" +
114        "                            <results>" +
115        "                              <org.easymock.internal.Result>" +
116        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$6\"/>" +
117        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
118        "                              </org.easymock.internal.Result>" +
119        "                            </results>" +
120        "                          </results>" +
121        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
122        "                      </results>" +
123        "                      <checkOrder>false</checkOrder>" +
124        "                    </org.easymock.internal.UnorderedBehavior>" +
125        "                  </behaviorLists>" +
126        "                  <stubResults/>" +
127        "                  <nice>false</nice>" +
128        "                  <checkOrder>false</checkOrder>" +
129        "                  <isThreadSafe>true</isThreadSafe>" +
130        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
131        "                  <position>0</position>" +
132        "                </behavior>" +
133        "                <lock>" +
134        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
135        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
136        "                      <default>" +
137        "                        <state>0</state>" +
138        "                      </default>" +
139        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
140        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
141        "                      <default/>" +
142        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
143        "                  </sync>" +
144        "                </lock>" +
145        "              </state>" +
146        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
147        "              <type>DEFAULT</type>" +
148        "            </control>" +
149        "          </delegate>" +
150        "        </default>" +
151        "        <org.easymock.internal.MethodSerializationWrapper>" +
152        "          <className>java.lang.Object</className>" +
153        "          <methodName>toString</methodName>" +
154        "          <parameterTypeNames/>" +
155        "        </org.easymock.internal.MethodSerializationWrapper>" +
156        "        <org.easymock.internal.MethodSerializationWrapper>" +
157        "          <className>java.lang.Object</className>" +
158        "          <methodName>equals</methodName>" +
159        "          <parameterTypeNames>" +
160        "            <string>java.lang.Object</string>" +
161        "          </parameterTypeNames>" +
162        "        </org.easymock.internal.MethodSerializationWrapper>" +
163        "        <org.easymock.internal.MethodSerializationWrapper>" +
164        "          <className>java.lang.Object</className>" +
165        "          <methodName>hashCode</methodName>" +
166        "          <parameterTypeNames/>" +
167        "        </org.easymock.internal.MethodSerializationWrapper>" +
168        "      </org.easymock.internal.ObjectMethodsFilter>" +
169        "    </handler>" +
170        "  </offerDao>" +
171        "  <entityService class=\"dynamic-proxy\">" +
172        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
173        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
174        "      <org.easymock.internal.ObjectMethodsFilter>" +
175        "        <default>" +
176        "          <delegate>" +
177        "            <control>" +
178        "              <state class=\"org.easymock.internal.RecordState\">" +
179        "                <lastInvocationUsed>true</lastInvocationUsed>" +
180        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
181        "                  <behaviorLists/>" +
182        "                  <stubResults/>" +
183        "                  <nice>false</nice>" +
184        "                  <checkOrder>false</checkOrder>" +
185        "                  <isThreadSafe>true</isThreadSafe>" +
186        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
187        "                  <position>0</position>" +
188        "                </behavior>" +
189        "              </state>" +
190        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
191        "              <type>DEFAULT</type>" +
192        "            </control>" +
193        "          </delegate>" +
194        "        </default>" +
195        "        <org.easymock.internal.MethodSerializationWrapper>" +
196        "          <className>java.lang.Object</className>" +
197        "          <methodName>toString</methodName>" +
198        "          <parameterTypeNames/>" +
199        "        </org.easymock.internal.MethodSerializationWrapper>" +
200        "        <org.easymock.internal.MethodSerializationWrapper>" +
201        "          <className>java.lang.Object</className>" +
202        "          <methodName>equals</methodName>" +
203        "          <parameterTypeNames>" +
204        "            <string>java.lang.Object</string>" +
205        "          </parameterTypeNames>" +
206        "        </org.easymock.internal.MethodSerializationWrapper>" +
207        "        <org.easymock.internal.MethodSerializationWrapper>" +
208        "          <className>java.lang.Object</className>" +
209        "          <methodName>hashCode</methodName>" +
210        "          <parameterTypeNames/>" +
211        "        </org.easymock.internal.MethodSerializationWrapper>" +
212        "      </org.easymock.internal.ObjectMethodsFilter>" +
213        "    </handler>" +
214        "  </entityService>" +
215        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
216        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
217        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
218        String paramsObjectStr = 
219        "<object-array>" +
220        "  <null/>" +
221        "</object-array>";
222        Object[] paramObjects = deserializeObject(paramsObjectStr);
223        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
224        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
225    }
226
227    @Test
228    public void testFindRelatedQualifierRoot2() throws Exception {
229        String receivingObjectStr = 
230        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
231        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
232        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
233        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
234        "  </promotableItemFactory>" +
235        "  <offerDao class=\"dynamic-proxy\">" +
236        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
237        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
238        "      <org.easymock.internal.ObjectMethodsFilter>" +
239        "        <default>" +
240        "          <delegate>" +
241        "            <control>" +
242        "              <state class=\"org.easymock.internal.ReplayState\">" +
243        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
244        "                  <behaviorLists>" +
245        "                    <org.easymock.internal.UnorderedBehavior>" +
246        "                      <results>" +
247        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
248        "                          <expectedInvocation>" +
249        "                            <invocation serialization=\"custom\">" +
250        "                              <org.easymock.internal.Invocation>" +
251        "                                <default>" +
252        "                                  <arguments/>" +
253        "                                  <currentCaptures class=\"list\"/>" +
254        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
255        "                                </default>" +
256        "                                <org.easymock.internal.MethodSerializationWrapper>" +
257        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
258        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
259        "                                  <parameterTypeNames/>" +
260        "                                </org.easymock.internal.MethodSerializationWrapper>" +
261        "                              </org.easymock.internal.Invocation>" +
262        "                            </invocation>" +
263        "                            <matchers/>" +
264        "                          </expectedInvocation>" +
265        "                          <results>" +
266        "                            <callCount>3</callCount>" +
267        "                            <ranges>" +
268        "                              <org.easymock.internal.Range>" +
269        "                                <minimum>0</minimum>" +
270        "                                <maximum>2147483647</maximum>" +
271        "                              </org.easymock.internal.Range>" +
272        "                            </ranges>" +
273        "                            <results>" +
274        "                              <org.easymock.internal.Result>" +
275        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
276        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
277        "                              </org.easymock.internal.Result>" +
278        "                            </results>" +
279        "                          </results>" +
280        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
281        "                      </results>" +
282        "                      <checkOrder>false</checkOrder>" +
283        "                    </org.easymock.internal.UnorderedBehavior>" +
284        "                  </behaviorLists>" +
285        "                  <stubResults/>" +
286        "                  <nice>false</nice>" +
287        "                  <checkOrder>false</checkOrder>" +
288        "                  <isThreadSafe>true</isThreadSafe>" +
289        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
290        "                  <position>0</position>" +
291        "                </behavior>" +
292        "                <lock>" +
293        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
294        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
295        "                      <default>" +
296        "                        <state>0</state>" +
297        "                      </default>" +
298        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
299        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
300        "                      <default/>" +
301        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
302        "                  </sync>" +
303        "                </lock>" +
304        "              </state>" +
305        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
306        "              <type>DEFAULT</type>" +
307        "            </control>" +
308        "          </delegate>" +
309        "        </default>" +
310        "        <org.easymock.internal.MethodSerializationWrapper>" +
311        "          <className>java.lang.Object</className>" +
312        "          <methodName>toString</methodName>" +
313        "          <parameterTypeNames/>" +
314        "        </org.easymock.internal.MethodSerializationWrapper>" +
315        "        <org.easymock.internal.MethodSerializationWrapper>" +
316        "          <className>java.lang.Object</className>" +
317        "          <methodName>equals</methodName>" +
318        "          <parameterTypeNames>" +
319        "            <string>java.lang.Object</string>" +
320        "          </parameterTypeNames>" +
321        "        </org.easymock.internal.MethodSerializationWrapper>" +
322        "        <org.easymock.internal.MethodSerializationWrapper>" +
323        "          <className>java.lang.Object</className>" +
324        "          <methodName>hashCode</methodName>" +
325        "          <parameterTypeNames/>" +
326        "        </org.easymock.internal.MethodSerializationWrapper>" +
327        "      </org.easymock.internal.ObjectMethodsFilter>" +
328        "    </handler>" +
329        "  </offerDao>" +
330        "  <entityService class=\"dynamic-proxy\">" +
331        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
332        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
333        "      <org.easymock.internal.ObjectMethodsFilter>" +
334        "        <default>" +
335        "          <delegate>" +
336        "            <control>" +
337        "              <state class=\"org.easymock.internal.RecordState\">" +
338        "                <lastInvocationUsed>true</lastInvocationUsed>" +
339        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
340        "                  <behaviorLists/>" +
341        "                  <stubResults/>" +
342        "                  <nice>false</nice>" +
343        "                  <checkOrder>false</checkOrder>" +
344        "                  <isThreadSafe>true</isThreadSafe>" +
345        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
346        "                  <position>0</position>" +
347        "                </behavior>" +
348        "              </state>" +
349        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
350        "              <type>DEFAULT</type>" +
351        "            </control>" +
352        "          </delegate>" +
353        "        </default>" +
354        "        <org.easymock.internal.MethodSerializationWrapper>" +
355        "          <className>java.lang.Object</className>" +
356        "          <methodName>toString</methodName>" +
357        "          <parameterTypeNames/>" +
358        "        </org.easymock.internal.MethodSerializationWrapper>" +
359        "        <org.easymock.internal.MethodSerializationWrapper>" +
360        "          <className>java.lang.Object</className>" +
361        "          <methodName>equals</methodName>" +
362        "          <parameterTypeNames>" +
363        "            <string>java.lang.Object</string>" +
364        "          </parameterTypeNames>" +
365        "        </org.easymock.internal.MethodSerializationWrapper>" +
366        "        <org.easymock.internal.MethodSerializationWrapper>" +
367        "          <className>java.lang.Object</className>" +
368        "          <methodName>hashCode</methodName>" +
369        "          <parameterTypeNames/>" +
370        "        </org.easymock.internal.MethodSerializationWrapper>" +
371        "      </org.easymock.internal.ObjectMethodsFilter>" +
372        "    </handler>" +
373        "  </entityService>" +
374        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
375        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
376        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
377        String paramsObjectStr = 
378        "<object-array>" +
379        "  <null/>" +
380        "</object-array>";
381        Object[] paramObjects = deserializeObject(paramsObjectStr);
382        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
383        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
384    }
385
386    @Test
387    public void testFindRelatedQualifierRoot3() throws Exception {
388        ClassLoader classLoader = getClass().getClassLoader();
389        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot3-receiving.xml").getFile());
390        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
391        String paramsObjectStr = 
392        "<object-array>" +
393        "  <null/>" +
394        "</object-array>";
395        Object[] paramObjects = deserializeObject(paramsObjectStr);
396        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
397        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
398    }
399
400    @Test
401    public void testFindRelatedQualifierRoot4() throws Exception {
402        ClassLoader classLoader = getClass().getClassLoader();
403        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot4-receiving.xml").getFile());
404        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
405        String paramsObjectStr = 
406        "<object-array>" +
407        "  <null/>" +
408        "</object-array>";
409        Object[] paramObjects = deserializeObject(paramsObjectStr);
410        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
411        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
412    }
413
414    @Test
415    public void testFindRelatedQualifierRoot5() throws Exception {
416        ClassLoader classLoader = getClass().getClassLoader();
417        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot5-receiving.xml").getFile());
418        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
419        String paramsObjectStr = 
420        "<object-array>" +
421        "  <null/>" +
422        "</object-array>";
423        Object[] paramObjects = deserializeObject(paramsObjectStr);
424        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
425        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
426    }
427
428    @Test
429    public void testFindRelatedQualifierRoot6() throws Exception {
430        String receivingObjectStr = 
431        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
432        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
433        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
434        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
435        "  </promotableItemFactory>" +
436        "  <offerDao class=\"dynamic-proxy\">" +
437        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
438        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
439        "      <org.easymock.internal.ObjectMethodsFilter>" +
440        "        <default>" +
441        "          <delegate>" +
442        "            <control>" +
443        "              <state class=\"org.easymock.internal.ReplayState\">" +
444        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
445        "                  <behaviorLists>" +
446        "                    <org.easymock.internal.UnorderedBehavior>" +
447        "                      <results>" +
448        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
449        "                          <expectedInvocation>" +
450        "                            <invocation serialization=\"custom\">" +
451        "                              <org.easymock.internal.Invocation>" +
452        "                                <default>" +
453        "                                  <arguments/>" +
454        "                                  <currentCaptures class=\"list\"/>" +
455        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
456        "                                </default>" +
457        "                                <org.easymock.internal.MethodSerializationWrapper>" +
458        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
459        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
460        "                                  <parameterTypeNames/>" +
461        "                                </org.easymock.internal.MethodSerializationWrapper>" +
462        "                              </org.easymock.internal.Invocation>" +
463        "                            </invocation>" +
464        "                            <matchers/>" +
465        "                          </expectedInvocation>" +
466        "                          <results>" +
467        "                            <callCount>5</callCount>" +
468        "                            <ranges>" +
469        "                              <org.easymock.internal.Range>" +
470        "                                <minimum>0</minimum>" +
471        "                                <maximum>2147483647</maximum>" +
472        "                              </org.easymock.internal.Range>" +
473        "                            </ranges>" +
474        "                            <results>" +
475        "                              <org.easymock.internal.Result>" +
476        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
477        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
478        "                              </org.easymock.internal.Result>" +
479        "                            </results>" +
480        "                          </results>" +
481        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
482        "                      </results>" +
483        "                      <checkOrder>false</checkOrder>" +
484        "                    </org.easymock.internal.UnorderedBehavior>" +
485        "                  </behaviorLists>" +
486        "                  <stubResults/>" +
487        "                  <nice>false</nice>" +
488        "                  <checkOrder>false</checkOrder>" +
489        "                  <isThreadSafe>true</isThreadSafe>" +
490        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
491        "                  <position>0</position>" +
492        "                </behavior>" +
493        "                <lock>" +
494        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
495        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
496        "                      <default>" +
497        "                        <state>0</state>" +
498        "                      </default>" +
499        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
500        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
501        "                      <default/>" +
502        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
503        "                  </sync>" +
504        "                </lock>" +
505        "              </state>" +
506        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
507        "              <type>DEFAULT</type>" +
508        "            </control>" +
509        "          </delegate>" +
510        "        </default>" +
511        "        <org.easymock.internal.MethodSerializationWrapper>" +
512        "          <className>java.lang.Object</className>" +
513        "          <methodName>toString</methodName>" +
514        "          <parameterTypeNames/>" +
515        "        </org.easymock.internal.MethodSerializationWrapper>" +
516        "        <org.easymock.internal.MethodSerializationWrapper>" +
517        "          <className>java.lang.Object</className>" +
518        "          <methodName>equals</methodName>" +
519        "          <parameterTypeNames>" +
520        "            <string>java.lang.Object</string>" +
521        "          </parameterTypeNames>" +
522        "        </org.easymock.internal.MethodSerializationWrapper>" +
523        "        <org.easymock.internal.MethodSerializationWrapper>" +
524        "          <className>java.lang.Object</className>" +
525        "          <methodName>hashCode</methodName>" +
526        "          <parameterTypeNames/>" +
527        "        </org.easymock.internal.MethodSerializationWrapper>" +
528        "      </org.easymock.internal.ObjectMethodsFilter>" +
529        "    </handler>" +
530        "  </offerDao>" +
531        "  <entityService class=\"dynamic-proxy\">" +
532        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
533        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
534        "      <org.easymock.internal.ObjectMethodsFilter>" +
535        "        <default>" +
536        "          <delegate>" +
537        "            <control>" +
538        "              <state class=\"org.easymock.internal.RecordState\">" +
539        "                <lastInvocationUsed>true</lastInvocationUsed>" +
540        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
541        "                  <behaviorLists/>" +
542        "                  <stubResults/>" +
543        "                  <nice>false</nice>" +
544        "                  <checkOrder>false</checkOrder>" +
545        "                  <isThreadSafe>true</isThreadSafe>" +
546        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
547        "                  <position>0</position>" +
548        "                </behavior>" +
549        "              </state>" +
550        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
551        "              <type>DEFAULT</type>" +
552        "            </control>" +
553        "          </delegate>" +
554        "        </default>" +
555        "        <org.easymock.internal.MethodSerializationWrapper>" +
556        "          <className>java.lang.Object</className>" +
557        "          <methodName>toString</methodName>" +
558        "          <parameterTypeNames/>" +
559        "        </org.easymock.internal.MethodSerializationWrapper>" +
560        "        <org.easymock.internal.MethodSerializationWrapper>" +
561        "          <className>java.lang.Object</className>" +
562        "          <methodName>equals</methodName>" +
563        "          <parameterTypeNames>" +
564        "            <string>java.lang.Object</string>" +
565        "          </parameterTypeNames>" +
566        "        </org.easymock.internal.MethodSerializationWrapper>" +
567        "        <org.easymock.internal.MethodSerializationWrapper>" +
568        "          <className>java.lang.Object</className>" +
569        "          <methodName>hashCode</methodName>" +
570        "          <parameterTypeNames/>" +
571        "        </org.easymock.internal.MethodSerializationWrapper>" +
572        "      </org.easymock.internal.ObjectMethodsFilter>" +
573        "    </handler>" +
574        "  </entityService>" +
575        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
576        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
577        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
578        String paramsObjectStr = 
579        "<object-array>" +
580        "  <null/>" +
581        "</object-array>";
582        Object[] paramObjects = deserializeObject(paramsObjectStr);
583        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
584        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
585    }
586
587    @Test
588    public void testFindRelatedQualifierRoot7() throws Exception {
589        String receivingObjectStr = 
590        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
591        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
592        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
593        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
594        "  </promotableItemFactory>" +
595        "  <offerDao class=\"dynamic-proxy\">" +
596        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
597        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
598        "      <org.easymock.internal.ObjectMethodsFilter>" +
599        "        <default>" +
600        "          <delegate>" +
601        "            <control>" +
602        "              <state class=\"org.easymock.internal.ReplayState\">" +
603        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
604        "                  <behaviorLists>" +
605        "                    <org.easymock.internal.UnorderedBehavior>" +
606        "                      <results>" +
607        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
608        "                          <expectedInvocation>" +
609        "                            <invocation serialization=\"custom\">" +
610        "                              <org.easymock.internal.Invocation>" +
611        "                                <default>" +
612        "                                  <arguments/>" +
613        "                                  <currentCaptures class=\"list\"/>" +
614        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
615        "                                </default>" +
616        "                                <org.easymock.internal.MethodSerializationWrapper>" +
617        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
618        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
619        "                                  <parameterTypeNames/>" +
620        "                                </org.easymock.internal.MethodSerializationWrapper>" +
621        "                              </org.easymock.internal.Invocation>" +
622        "                            </invocation>" +
623        "                            <matchers/>" +
624        "                          </expectedInvocation>" +
625        "                          <results>" +
626        "                            <callCount>0</callCount>" +
627        "                            <ranges>" +
628        "                              <org.easymock.internal.Range>" +
629        "                                <minimum>0</minimum>" +
630        "                                <maximum>2147483647</maximum>" +
631        "                              </org.easymock.internal.Range>" +
632        "                            </ranges>" +
633        "                            <results>" +
634        "                              <org.easymock.internal.Result>" +
635        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
636        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
637        "                              </org.easymock.internal.Result>" +
638        "                            </results>" +
639        "                          </results>" +
640        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
641        "                      </results>" +
642        "                      <checkOrder>false</checkOrder>" +
643        "                    </org.easymock.internal.UnorderedBehavior>" +
644        "                  </behaviorLists>" +
645        "                  <stubResults/>" +
646        "                  <nice>false</nice>" +
647        "                  <checkOrder>false</checkOrder>" +
648        "                  <isThreadSafe>true</isThreadSafe>" +
649        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
650        "                  <position>0</position>" +
651        "                </behavior>" +
652        "                <lock>" +
653        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
654        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
655        "                      <default>" +
656        "                        <state>0</state>" +
657        "                      </default>" +
658        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
659        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
660        "                      <default/>" +
661        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
662        "                  </sync>" +
663        "                </lock>" +
664        "              </state>" +
665        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
666        "              <type>DEFAULT</type>" +
667        "            </control>" +
668        "          </delegate>" +
669        "        </default>" +
670        "        <org.easymock.internal.MethodSerializationWrapper>" +
671        "          <className>java.lang.Object</className>" +
672        "          <methodName>toString</methodName>" +
673        "          <parameterTypeNames/>" +
674        "        </org.easymock.internal.MethodSerializationWrapper>" +
675        "        <org.easymock.internal.MethodSerializationWrapper>" +
676        "          <className>java.lang.Object</className>" +
677        "          <methodName>equals</methodName>" +
678        "          <parameterTypeNames>" +
679        "            <string>java.lang.Object</string>" +
680        "          </parameterTypeNames>" +
681        "        </org.easymock.internal.MethodSerializationWrapper>" +
682        "        <org.easymock.internal.MethodSerializationWrapper>" +
683        "          <className>java.lang.Object</className>" +
684        "          <methodName>hashCode</methodName>" +
685        "          <parameterTypeNames/>" +
686        "        </org.easymock.internal.MethodSerializationWrapper>" +
687        "      </org.easymock.internal.ObjectMethodsFilter>" +
688        "    </handler>" +
689        "  </offerDao>" +
690        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
691        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
692        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
693        String paramsObjectStr = 
694        "<object-array>" +
695        "  <null/>" +
696        "</object-array>";
697        Object[] paramObjects = deserializeObject(paramsObjectStr);
698        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
699        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
700    }
701
702    @Test
703    public void testFindRelatedQualifierRoot8() throws Exception {
704        ClassLoader classLoader = getClass().getClassLoader();
705        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot8-receiving.xml").getFile());
706        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
707        String paramsObjectStr = 
708        "<object-array>" +
709        "  <null/>" +
710        "</object-array>";
711        Object[] paramObjects = deserializeObject(paramsObjectStr);
712        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
713        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
714    }
715
716    @Test
717    public void testFindRelatedQualifierRoot9() throws Exception {
718        ClassLoader classLoader = getClass().getClassLoader();
719        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot9-receiving.xml").getFile());
720        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
721        String paramsObjectStr = 
722        "<object-array>" +
723        "  <null/>" +
724        "</object-array>";
725        Object[] paramObjects = deserializeObject(paramsObjectStr);
726        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
727        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
728    }
729
730    @Test
731    public void testFindRelatedQualifierRoot10() throws Exception {
732        ClassLoader classLoader = getClass().getClassLoader();
733        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot10-receiving.xml").getFile());
734        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
735        String paramsObjectStr = 
736        "<object-array>" +
737        "  <null/>" +
738        "</object-array>";
739        Object[] paramObjects = deserializeObject(paramsObjectStr);
740        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
741        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
742    }
743
744    @Test
745    public void testFindRelatedQualifierRoot11() throws Exception {
746        ClassLoader classLoader = getClass().getClassLoader();
747        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot11-receiving.xml").getFile());
748        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
749        String paramsObjectStr = 
750        "<object-array>" +
751        "  <null/>" +
752        "</object-array>";
753        Object[] paramObjects = deserializeObject(paramsObjectStr);
754        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
755        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
756    }
757
758    @Test
759    public void testFindRelatedQualifierRoot12() throws Exception {
760        ClassLoader classLoader = getClass().getClassLoader();
761        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot12-receiving.xml").getFile());
762        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
763        String paramsObjectStr = 
764        "<object-array>" +
765        "  <null/>" +
766        "</object-array>";
767        Object[] paramObjects = deserializeObject(paramsObjectStr);
768        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
769        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
770    }
771
772    @Test
773    public void testFindRelatedQualifierRoot13() throws Exception {
774        String receivingObjectStr = 
775        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
776        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
777        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
778        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
779        "  </promotableItemFactory>" +
780        "  <offerDao class=\"dynamic-proxy\">" +
781        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
782        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
783        "      <org.easymock.internal.ObjectMethodsFilter>" +
784        "        <default>" +
785        "          <delegate>" +
786        "            <control>" +
787        "              <state class=\"org.easymock.internal.ReplayState\">" +
788        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
789        "                  <behaviorLists>" +
790        "                    <org.easymock.internal.UnorderedBehavior>" +
791        "                      <results>" +
792        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
793        "                          <expectedInvocation>" +
794        "                            <invocation serialization=\"custom\">" +
795        "                              <org.easymock.internal.Invocation>" +
796        "                                <default>" +
797        "                                  <arguments/>" +
798        "                                  <currentCaptures class=\"list\"/>" +
799        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
800        "                                </default>" +
801        "                                <org.easymock.internal.MethodSerializationWrapper>" +
802        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
803        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
804        "                                  <parameterTypeNames/>" +
805        "                                </org.easymock.internal.MethodSerializationWrapper>" +
806        "                              </org.easymock.internal.Invocation>" +
807        "                            </invocation>" +
808        "                            <matchers/>" +
809        "                          </expectedInvocation>" +
810        "                          <results>" +
811        "                            <callCount>2</callCount>" +
812        "                            <ranges>" +
813        "                              <org.easymock.internal.Range>" +
814        "                                <minimum>0</minimum>" +
815        "                                <maximum>2147483647</maximum>" +
816        "                              </org.easymock.internal.Range>" +
817        "                            </ranges>" +
818        "                            <results>" +
819        "                              <org.easymock.internal.Result>" +
820        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
821        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
822        "                              </org.easymock.internal.Result>" +
823        "                            </results>" +
824        "                          </results>" +
825        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
826        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
827        "                          <expectedInvocation>" +
828        "                            <invocation serialization=\"custom\">" +
829        "                              <org.easymock.internal.Invocation>" +
830        "                                <default>" +
831        "                                  <arguments/>" +
832        "                                  <currentCaptures class=\"list\"/>" +
833        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
834        "                                </default>" +
835        "                                <org.easymock.internal.MethodSerializationWrapper>" +
836        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
837        "                                  <methodName>createFulfillmentGroupAdjustment</methodName>" +
838        "                                  <parameterTypeNames/>" +
839        "                                </org.easymock.internal.MethodSerializationWrapper>" +
840        "                              </org.easymock.internal.Invocation>" +
841        "                            </invocation>" +
842        "                            <matchers/>" +
843        "                          </expectedInvocation>" +
844        "                          <results>" +
845        "                            <callCount>1</callCount>" +
846        "                            <ranges>" +
847        "                              <org.easymock.internal.Range reference=\"../../../../org.easymock.internal.ExpectedInvocationAndResults/results/ranges/org.easymock.internal.Range\"/>" +
848        "                            </ranges>" +
849        "                            <results>" +
850        "                              <org.easymock.internal.Result>" +
851        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$6\"/>" +
852        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
853        "                              </org.easymock.internal.Result>" +
854        "                            </results>" +
855        "                          </results>" +
856        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
857        "                      </results>" +
858        "                      <checkOrder>false</checkOrder>" +
859        "                    </org.easymock.internal.UnorderedBehavior>" +
860        "                  </behaviorLists>" +
861        "                  <stubResults/>" +
862        "                  <nice>false</nice>" +
863        "                  <checkOrder>false</checkOrder>" +
864        "                  <isThreadSafe>true</isThreadSafe>" +
865        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
866        "                  <position>0</position>" +
867        "                </behavior>" +
868        "                <lock>" +
869        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
870        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
871        "                      <default>" +
872        "                        <state>0</state>" +
873        "                      </default>" +
874        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
875        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
876        "                      <default/>" +
877        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
878        "                  </sync>" +
879        "                </lock>" +
880        "              </state>" +
881        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
882        "              <type>DEFAULT</type>" +
883        "            </control>" +
884        "          </delegate>" +
885        "        </default>" +
886        "        <org.easymock.internal.MethodSerializationWrapper>" +
887        "          <className>java.lang.Object</className>" +
888        "          <methodName>toString</methodName>" +
889        "          <parameterTypeNames/>" +
890        "        </org.easymock.internal.MethodSerializationWrapper>" +
891        "        <org.easymock.internal.MethodSerializationWrapper>" +
892        "          <className>java.lang.Object</className>" +
893        "          <methodName>equals</methodName>" +
894        "          <parameterTypeNames>" +
895        "            <string>java.lang.Object</string>" +
896        "          </parameterTypeNames>" +
897        "        </org.easymock.internal.MethodSerializationWrapper>" +
898        "        <org.easymock.internal.MethodSerializationWrapper>" +
899        "          <className>java.lang.Object</className>" +
900        "          <methodName>hashCode</methodName>" +
901        "          <parameterTypeNames/>" +
902        "        </org.easymock.internal.MethodSerializationWrapper>" +
903        "      </org.easymock.internal.ObjectMethodsFilter>" +
904        "    </handler>" +
905        "  </offerDao>" +
906        "  <entityService class=\"dynamic-proxy\">" +
907        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
908        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
909        "      <org.easymock.internal.ObjectMethodsFilter>" +
910        "        <default>" +
911        "          <delegate>" +
912        "            <control>" +
913        "              <state class=\"org.easymock.internal.RecordState\">" +
914        "                <lastInvocationUsed>true</lastInvocationUsed>" +
915        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
916        "                  <behaviorLists/>" +
917        "                  <stubResults/>" +
918        "                  <nice>false</nice>" +
919        "                  <checkOrder>false</checkOrder>" +
920        "                  <isThreadSafe>true</isThreadSafe>" +
921        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
922        "                  <position>0</position>" +
923        "                </behavior>" +
924        "              </state>" +
925        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
926        "              <type>DEFAULT</type>" +
927        "            </control>" +
928        "          </delegate>" +
929        "        </default>" +
930        "        <org.easymock.internal.MethodSerializationWrapper>" +
931        "          <className>java.lang.Object</className>" +
932        "          <methodName>toString</methodName>" +
933        "          <parameterTypeNames/>" +
934        "        </org.easymock.internal.MethodSerializationWrapper>" +
935        "        <org.easymock.internal.MethodSerializationWrapper>" +
936        "          <className>java.lang.Object</className>" +
937        "          <methodName>equals</methodName>" +
938        "          <parameterTypeNames>" +
939        "            <string>java.lang.Object</string>" +
940        "          </parameterTypeNames>" +
941        "        </org.easymock.internal.MethodSerializationWrapper>" +
942        "        <org.easymock.internal.MethodSerializationWrapper>" +
943        "          <className>java.lang.Object</className>" +
944        "          <methodName>hashCode</methodName>" +
945        "          <parameterTypeNames/>" +
946        "        </org.easymock.internal.MethodSerializationWrapper>" +
947        "      </org.easymock.internal.ObjectMethodsFilter>" +
948        "    </handler>" +
949        "  </entityService>" +
950        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
951        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
952        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
953        String paramsObjectStr = 
954        "<object-array>" +
955        "  <null/>" +
956        "</object-array>";
957        Object[] paramObjects = deserializeObject(paramsObjectStr);
958        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
959        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
960    }
961
962    @Test
963    public void testFindRelatedQualifierRoot14() throws Exception {
964        String receivingObjectStr = 
965        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
966        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
967        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
968        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
969        "  </promotableItemFactory>" +
970        "  <offerDao class=\"dynamic-proxy\">" +
971        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
972        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
973        "      <org.easymock.internal.ObjectMethodsFilter>" +
974        "        <default>" +
975        "          <delegate>" +
976        "            <control>" +
977        "              <state class=\"org.easymock.internal.ReplayState\">" +
978        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
979        "                  <behaviorLists>" +
980        "                    <org.easymock.internal.UnorderedBehavior>" +
981        "                      <results>" +
982        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
983        "                          <expectedInvocation>" +
984        "                            <invocation serialization=\"custom\">" +
985        "                              <org.easymock.internal.Invocation>" +
986        "                                <default>" +
987        "                                  <arguments/>" +
988        "                                  <currentCaptures class=\"list\"/>" +
989        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
990        "                                </default>" +
991        "                                <org.easymock.internal.MethodSerializationWrapper>" +
992        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
993        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
994        "                                  <parameterTypeNames/>" +
995        "                                </org.easymock.internal.MethodSerializationWrapper>" +
996        "                              </org.easymock.internal.Invocation>" +
997        "                            </invocation>" +
998        "                            <matchers/>" +
999        "                          </expectedInvocation>" +
1000        "                          <results>" +
1001        "                            <callCount>0</callCount>" +
1002        "                            <ranges>" +
1003        "                              <org.easymock.internal.Range>" +
1004        "                                <minimum>0</minimum>" +
1005        "                                <maximum>2147483647</maximum>" +
1006        "                              </org.easymock.internal.Range>" +
1007        "                            </ranges>" +
1008        "                            <results>" +
1009        "                              <org.easymock.internal.Result>" +
1010        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
1011        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
1012        "                              </org.easymock.internal.Result>" +
1013        "                            </results>" +
1014        "                          </results>" +
1015        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
1016        "                      </results>" +
1017        "                      <checkOrder>false</checkOrder>" +
1018        "                    </org.easymock.internal.UnorderedBehavior>" +
1019        "                  </behaviorLists>" +
1020        "                  <stubResults/>" +
1021        "                  <nice>false</nice>" +
1022        "                  <checkOrder>false</checkOrder>" +
1023        "                  <isThreadSafe>true</isThreadSafe>" +
1024        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1025        "                  <position>0</position>" +
1026        "                </behavior>" +
1027        "                <lock>" +
1028        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
1029        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1030        "                      <default>" +
1031        "                        <state>0</state>" +
1032        "                      </default>" +
1033        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1034        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
1035        "                      <default/>" +
1036        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
1037        "                  </sync>" +
1038        "                </lock>" +
1039        "              </state>" +
1040        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1041        "              <type>DEFAULT</type>" +
1042        "            </control>" +
1043        "          </delegate>" +
1044        "        </default>" +
1045        "        <org.easymock.internal.MethodSerializationWrapper>" +
1046        "          <className>java.lang.Object</className>" +
1047        "          <methodName>toString</methodName>" +
1048        "          <parameterTypeNames/>" +
1049        "        </org.easymock.internal.MethodSerializationWrapper>" +
1050        "        <org.easymock.internal.MethodSerializationWrapper>" +
1051        "          <className>java.lang.Object</className>" +
1052        "          <methodName>equals</methodName>" +
1053        "          <parameterTypeNames>" +
1054        "            <string>java.lang.Object</string>" +
1055        "          </parameterTypeNames>" +
1056        "        </org.easymock.internal.MethodSerializationWrapper>" +
1057        "        <org.easymock.internal.MethodSerializationWrapper>" +
1058        "          <className>java.lang.Object</className>" +
1059        "          <methodName>hashCode</methodName>" +
1060        "          <parameterTypeNames/>" +
1061        "        </org.easymock.internal.MethodSerializationWrapper>" +
1062        "      </org.easymock.internal.ObjectMethodsFilter>" +
1063        "    </handler>" +
1064        "  </offerDao>" +
1065        "  <entityService class=\"dynamic-proxy\">" +
1066        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
1067        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1068        "      <org.easymock.internal.ObjectMethodsFilter>" +
1069        "        <default>" +
1070        "          <delegate>" +
1071        "            <control>" +
1072        "              <state class=\"org.easymock.internal.RecordState\">" +
1073        "                <lastInvocationUsed>true</lastInvocationUsed>" +
1074        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1075        "                  <behaviorLists/>" +
1076        "                  <stubResults/>" +
1077        "                  <nice>false</nice>" +
1078        "                  <checkOrder>false</checkOrder>" +
1079        "                  <isThreadSafe>true</isThreadSafe>" +
1080        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1081        "                  <position>0</position>" +
1082        "                </behavior>" +
1083        "              </state>" +
1084        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1085        "              <type>DEFAULT</type>" +
1086        "            </control>" +
1087        "          </delegate>" +
1088        "        </default>" +
1089        "        <org.easymock.internal.MethodSerializationWrapper>" +
1090        "          <className>java.lang.Object</className>" +
1091        "          <methodName>toString</methodName>" +
1092        "          <parameterTypeNames/>" +
1093        "        </org.easymock.internal.MethodSerializationWrapper>" +
1094        "        <org.easymock.internal.MethodSerializationWrapper>" +
1095        "          <className>java.lang.Object</className>" +
1096        "          <methodName>equals</methodName>" +
1097        "          <parameterTypeNames>" +
1098        "            <string>java.lang.Object</string>" +
1099        "          </parameterTypeNames>" +
1100        "        </org.easymock.internal.MethodSerializationWrapper>" +
1101        "        <org.easymock.internal.MethodSerializationWrapper>" +
1102        "          <className>java.lang.Object</className>" +
1103        "          <methodName>hashCode</methodName>" +
1104        "          <parameterTypeNames/>" +
1105        "        </org.easymock.internal.MethodSerializationWrapper>" +
1106        "      </org.easymock.internal.ObjectMethodsFilter>" +
1107        "    </handler>" +
1108        "  </entityService>" +
1109        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
1110        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
1111        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
1112        String paramsObjectStr = 
1113        "<object-array>" +
1114        "  <null/>" +
1115        "</object-array>";
1116        Object[] paramObjects = deserializeObject(paramsObjectStr);
1117        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
1118        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
1119    }
1120
1121    @Test
1122    public void testFindRelatedQualifierRoot15() throws Exception {
1123        ClassLoader classLoader = getClass().getClassLoader();
1124        File fileReceiving = new File(classLoader.getResource("org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl.findRelatedQualifierRoot15-receiving.xml").getFile());
1125        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(fileReceiving);
1126        String paramsObjectStr = 
1127        "<object-array>" +
1128        "  <null/>" +
1129        "</object-array>";
1130        Object[] paramObjects = deserializeObject(paramsObjectStr);
1131        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
1132        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
1133    }
1134
1135    @Test
1136    public void testFindRelatedQualifierRoot16() throws Exception {
1137        String receivingObjectStr = 
1138        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
1139        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
1140        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
1141        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
1142        "  </promotableItemFactory>" +
1143        "  <offerDao class=\"dynamic-proxy\">" +
1144        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
1145        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1146        "      <org.easymock.internal.ObjectMethodsFilter>" +
1147        "        <default>" +
1148        "          <delegate>" +
1149        "            <control>" +
1150        "              <state class=\"org.easymock.internal.ReplayState\">" +
1151        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1152        "                  <behaviorLists>" +
1153        "                    <org.easymock.internal.UnorderedBehavior>" +
1154        "                      <results>" +
1155        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
1156        "                          <expectedInvocation>" +
1157        "                            <invocation serialization=\"custom\">" +
1158        "                              <org.easymock.internal.Invocation>" +
1159        "                                <default>" +
1160        "                                  <arguments/>" +
1161        "                                  <currentCaptures class=\"list\"/>" +
1162        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
1163        "                                </default>" +
1164        "                                <org.easymock.internal.MethodSerializationWrapper>" +
1165        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
1166        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
1167        "                                  <parameterTypeNames/>" +
1168        "                                </org.easymock.internal.MethodSerializationWrapper>" +
1169        "                              </org.easymock.internal.Invocation>" +
1170        "                            </invocation>" +
1171        "                            <matchers/>" +
1172        "                          </expectedInvocation>" +
1173        "                          <results>" +
1174        "                            <callCount>1</callCount>" +
1175        "                            <ranges>" +
1176        "                              <org.easymock.internal.Range>" +
1177        "                                <minimum>0</minimum>" +
1178        "                                <maximum>2147483647</maximum>" +
1179        "                              </org.easymock.internal.Range>" +
1180        "                            </ranges>" +
1181        "                            <results>" +
1182        "                              <org.easymock.internal.Result>" +
1183        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
1184        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
1185        "                              </org.easymock.internal.Result>" +
1186        "                            </results>" +
1187        "                          </results>" +
1188        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
1189        "                      </results>" +
1190        "                      <checkOrder>false</checkOrder>" +
1191        "                    </org.easymock.internal.UnorderedBehavior>" +
1192        "                  </behaviorLists>" +
1193        "                  <stubResults/>" +
1194        "                  <nice>false</nice>" +
1195        "                  <checkOrder>false</checkOrder>" +
1196        "                  <isThreadSafe>true</isThreadSafe>" +
1197        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1198        "                  <position>0</position>" +
1199        "                </behavior>" +
1200        "                <lock>" +
1201        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
1202        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1203        "                      <default>" +
1204        "                        <state>0</state>" +
1205        "                      </default>" +
1206        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1207        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
1208        "                      <default/>" +
1209        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
1210        "                  </sync>" +
1211        "                </lock>" +
1212        "              </state>" +
1213        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1214        "              <type>DEFAULT</type>" +
1215        "            </control>" +
1216        "          </delegate>" +
1217        "        </default>" +
1218        "        <org.easymock.internal.MethodSerializationWrapper>" +
1219        "          <className>java.lang.Object</className>" +
1220        "          <methodName>toString</methodName>" +
1221        "          <parameterTypeNames/>" +
1222        "        </org.easymock.internal.MethodSerializationWrapper>" +
1223        "        <org.easymock.internal.MethodSerializationWrapper>" +
1224        "          <className>java.lang.Object</className>" +
1225        "          <methodName>equals</methodName>" +
1226        "          <parameterTypeNames>" +
1227        "            <string>java.lang.Object</string>" +
1228        "          </parameterTypeNames>" +
1229        "        </org.easymock.internal.MethodSerializationWrapper>" +
1230        "        <org.easymock.internal.MethodSerializationWrapper>" +
1231        "          <className>java.lang.Object</className>" +
1232        "          <methodName>hashCode</methodName>" +
1233        "          <parameterTypeNames/>" +
1234        "        </org.easymock.internal.MethodSerializationWrapper>" +
1235        "      </org.easymock.internal.ObjectMethodsFilter>" +
1236        "    </handler>" +
1237        "  </offerDao>" +
1238        "  <entityService class=\"dynamic-proxy\">" +
1239        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
1240        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1241        "      <org.easymock.internal.ObjectMethodsFilter>" +
1242        "        <default>" +
1243        "          <delegate>" +
1244        "            <control>" +
1245        "              <state class=\"org.easymock.internal.RecordState\">" +
1246        "                <lastInvocationUsed>true</lastInvocationUsed>" +
1247        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1248        "                  <behaviorLists/>" +
1249        "                  <stubResults/>" +
1250        "                  <nice>false</nice>" +
1251        "                  <checkOrder>false</checkOrder>" +
1252        "                  <isThreadSafe>true</isThreadSafe>" +
1253        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1254        "                  <position>0</position>" +
1255        "                </behavior>" +
1256        "              </state>" +
1257        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1258        "              <type>DEFAULT</type>" +
1259        "            </control>" +
1260        "          </delegate>" +
1261        "        </default>" +
1262        "        <org.easymock.internal.MethodSerializationWrapper>" +
1263        "          <className>java.lang.Object</className>" +
1264        "          <methodName>toString</methodName>" +
1265        "          <parameterTypeNames/>" +
1266        "        </org.easymock.internal.MethodSerializationWrapper>" +
1267        "        <org.easymock.internal.MethodSerializationWrapper>" +
1268        "          <className>java.lang.Object</className>" +
1269        "          <methodName>equals</methodName>" +
1270        "          <parameterTypeNames>" +
1271        "            <string>java.lang.Object</string>" +
1272        "          </parameterTypeNames>" +
1273        "        </org.easymock.internal.MethodSerializationWrapper>" +
1274        "        <org.easymock.internal.MethodSerializationWrapper>" +
1275        "          <className>java.lang.Object</className>" +
1276        "          <methodName>hashCode</methodName>" +
1277        "          <parameterTypeNames/>" +
1278        "        </org.easymock.internal.MethodSerializationWrapper>" +
1279        "      </org.easymock.internal.ObjectMethodsFilter>" +
1280        "    </handler>" +
1281        "  </entityService>" +
1282        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
1283        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
1284        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
1285        String paramsObjectStr = 
1286        "<object-array>" +
1287        "  <null/>" +
1288        "</object-array>";
1289        Object[] paramObjects = deserializeObject(paramsObjectStr);
1290        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
1291        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
1292    }
1293
1294    @Test
1295    public void testFindRelatedQualifierRoot17() throws Exception {
1296        String receivingObjectStr = 
1297        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
1298        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
1299        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
1300        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
1301        "  </promotableItemFactory>" +
1302        "  <offerDao class=\"dynamic-proxy\">" +
1303        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
1304        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1305        "      <org.easymock.internal.ObjectMethodsFilter>" +
1306        "        <default>" +
1307        "          <delegate>" +
1308        "            <control>" +
1309        "              <state class=\"org.easymock.internal.ReplayState\">" +
1310        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1311        "                  <behaviorLists>" +
1312        "                    <org.easymock.internal.UnorderedBehavior>" +
1313        "                      <results>" +
1314        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
1315        "                          <expectedInvocation>" +
1316        "                            <invocation serialization=\"custom\">" +
1317        "                              <org.easymock.internal.Invocation>" +
1318        "                                <default>" +
1319        "                                  <arguments/>" +
1320        "                                  <currentCaptures class=\"list\"/>" +
1321        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
1322        "                                </default>" +
1323        "                                <org.easymock.internal.MethodSerializationWrapper>" +
1324        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
1325        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
1326        "                                  <parameterTypeNames/>" +
1327        "                                </org.easymock.internal.MethodSerializationWrapper>" +
1328        "                              </org.easymock.internal.Invocation>" +
1329        "                            </invocation>" +
1330        "                            <matchers/>" +
1331        "                          </expectedInvocation>" +
1332        "                          <results>" +
1333        "                            <callCount>7</callCount>" +
1334        "                            <ranges>" +
1335        "                              <org.easymock.internal.Range>" +
1336        "                                <minimum>0</minimum>" +
1337        "                                <maximum>2147483647</maximum>" +
1338        "                              </org.easymock.internal.Range>" +
1339        "                            </ranges>" +
1340        "                            <results>" +
1341        "                              <org.easymock.internal.Result>" +
1342        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
1343        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
1344        "                              </org.easymock.internal.Result>" +
1345        "                            </results>" +
1346        "                          </results>" +
1347        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
1348        "                      </results>" +
1349        "                      <checkOrder>false</checkOrder>" +
1350        "                    </org.easymock.internal.UnorderedBehavior>" +
1351        "                  </behaviorLists>" +
1352        "                  <stubResults/>" +
1353        "                  <nice>false</nice>" +
1354        "                  <checkOrder>false</checkOrder>" +
1355        "                  <isThreadSafe>true</isThreadSafe>" +
1356        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1357        "                  <position>0</position>" +
1358        "                </behavior>" +
1359        "                <lock>" +
1360        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
1361        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1362        "                      <default>" +
1363        "                        <state>0</state>" +
1364        "                      </default>" +
1365        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1366        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
1367        "                      <default/>" +
1368        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
1369        "                  </sync>" +
1370        "                </lock>" +
1371        "              </state>" +
1372        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1373        "              <type>DEFAULT</type>" +
1374        "            </control>" +
1375        "          </delegate>" +
1376        "        </default>" +
1377        "        <org.easymock.internal.MethodSerializationWrapper>" +
1378        "          <className>java.lang.Object</className>" +
1379        "          <methodName>toString</methodName>" +
1380        "          <parameterTypeNames/>" +
1381        "        </org.easymock.internal.MethodSerializationWrapper>" +
1382        "        <org.easymock.internal.MethodSerializationWrapper>" +
1383        "          <className>java.lang.Object</className>" +
1384        "          <methodName>equals</methodName>" +
1385        "          <parameterTypeNames>" +
1386        "            <string>java.lang.Object</string>" +
1387        "          </parameterTypeNames>" +
1388        "        </org.easymock.internal.MethodSerializationWrapper>" +
1389        "        <org.easymock.internal.MethodSerializationWrapper>" +
1390        "          <className>java.lang.Object</className>" +
1391        "          <methodName>hashCode</methodName>" +
1392        "          <parameterTypeNames/>" +
1393        "        </org.easymock.internal.MethodSerializationWrapper>" +
1394        "      </org.easymock.internal.ObjectMethodsFilter>" +
1395        "    </handler>" +
1396        "  </offerDao>" +
1397        "  <entityService class=\"dynamic-proxy\">" +
1398        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
1399        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1400        "      <org.easymock.internal.ObjectMethodsFilter>" +
1401        "        <default>" +
1402        "          <delegate>" +
1403        "            <control>" +
1404        "              <state class=\"org.easymock.internal.RecordState\">" +
1405        "                <lastInvocationUsed>true</lastInvocationUsed>" +
1406        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1407        "                  <behaviorLists/>" +
1408        "                  <stubResults/>" +
1409        "                  <nice>false</nice>" +
1410        "                  <checkOrder>false</checkOrder>" +
1411        "                  <isThreadSafe>true</isThreadSafe>" +
1412        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1413        "                  <position>0</position>" +
1414        "                </behavior>" +
1415        "              </state>" +
1416        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1417        "              <type>DEFAULT</type>" +
1418        "            </control>" +
1419        "          </delegate>" +
1420        "        </default>" +
1421        "        <org.easymock.internal.MethodSerializationWrapper>" +
1422        "          <className>java.lang.Object</className>" +
1423        "          <methodName>toString</methodName>" +
1424        "          <parameterTypeNames/>" +
1425        "        </org.easymock.internal.MethodSerializationWrapper>" +
1426        "        <org.easymock.internal.MethodSerializationWrapper>" +
1427        "          <className>java.lang.Object</className>" +
1428        "          <methodName>equals</methodName>" +
1429        "          <parameterTypeNames>" +
1430        "            <string>java.lang.Object</string>" +
1431        "          </parameterTypeNames>" +
1432        "        </org.easymock.internal.MethodSerializationWrapper>" +
1433        "        <org.easymock.internal.MethodSerializationWrapper>" +
1434        "          <className>java.lang.Object</className>" +
1435        "          <methodName>hashCode</methodName>" +
1436        "          <parameterTypeNames/>" +
1437        "        </org.easymock.internal.MethodSerializationWrapper>" +
1438        "      </org.easymock.internal.ObjectMethodsFilter>" +
1439        "    </handler>" +
1440        "  </entityService>" +
1441        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
1442        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
1443        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
1444        String paramsObjectStr = 
1445        "<object-array>" +
1446        "  <null/>" +
1447        "</object-array>";
1448        Object[] paramObjects = deserializeObject(paramsObjectStr);
1449        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
1450        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
1451    }
1452
1453    @Test
1454    public void testFindRelatedQualifierRoot18() throws Exception {
1455        String receivingObjectStr = 
1456        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
1457        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
1458        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
1459        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
1460        "  </promotableItemFactory>" +
1461        "  <offerDao class=\"dynamic-proxy\">" +
1462        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
1463        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1464        "      <org.easymock.internal.ObjectMethodsFilter>" +
1465        "        <default>" +
1466        "          <delegate>" +
1467        "            <control>" +
1468        "              <state class=\"org.easymock.internal.ReplayState\">" +
1469        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1470        "                  <behaviorLists>" +
1471        "                    <org.easymock.internal.UnorderedBehavior>" +
1472        "                      <results>" +
1473        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
1474        "                          <expectedInvocation>" +
1475        "                            <invocation serialization=\"custom\">" +
1476        "                              <org.easymock.internal.Invocation>" +
1477        "                                <default>" +
1478        "                                  <arguments/>" +
1479        "                                  <currentCaptures class=\"list\"/>" +
1480        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
1481        "                                </default>" +
1482        "                                <org.easymock.internal.MethodSerializationWrapper>" +
1483        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
1484        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
1485        "                                  <parameterTypeNames/>" +
1486        "                                </org.easymock.internal.MethodSerializationWrapper>" +
1487        "                              </org.easymock.internal.Invocation>" +
1488        "                            </invocation>" +
1489        "                            <matchers/>" +
1490        "                          </expectedInvocation>" +
1491        "                          <results>" +
1492        "                            <callCount>2</callCount>" +
1493        "                            <ranges>" +
1494        "                              <org.easymock.internal.Range>" +
1495        "                                <minimum>0</minimum>" +
1496        "                                <maximum>2147483647</maximum>" +
1497        "                              </org.easymock.internal.Range>" +
1498        "                            </ranges>" +
1499        "                            <results>" +
1500        "                              <org.easymock.internal.Result>" +
1501        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
1502        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
1503        "                              </org.easymock.internal.Result>" +
1504        "                            </results>" +
1505        "                          </results>" +
1506        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
1507        "                      </results>" +
1508        "                      <checkOrder>false</checkOrder>" +
1509        "                    </org.easymock.internal.UnorderedBehavior>" +
1510        "                  </behaviorLists>" +
1511        "                  <stubResults/>" +
1512        "                  <nice>false</nice>" +
1513        "                  <checkOrder>false</checkOrder>" +
1514        "                  <isThreadSafe>true</isThreadSafe>" +
1515        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1516        "                  <position>0</position>" +
1517        "                </behavior>" +
1518        "                <lock>" +
1519        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
1520        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1521        "                      <default>" +
1522        "                        <state>0</state>" +
1523        "                      </default>" +
1524        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1525        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
1526        "                      <default/>" +
1527        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
1528        "                  </sync>" +
1529        "                </lock>" +
1530        "              </state>" +
1531        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1532        "              <type>DEFAULT</type>" +
1533        "            </control>" +
1534        "          </delegate>" +
1535        "        </default>" +
1536        "        <org.easymock.internal.MethodSerializationWrapper>" +
1537        "          <className>java.lang.Object</className>" +
1538        "          <methodName>toString</methodName>" +
1539        "          <parameterTypeNames/>" +
1540        "        </org.easymock.internal.MethodSerializationWrapper>" +
1541        "        <org.easymock.internal.MethodSerializationWrapper>" +
1542        "          <className>java.lang.Object</className>" +
1543        "          <methodName>equals</methodName>" +
1544        "          <parameterTypeNames>" +
1545        "            <string>java.lang.Object</string>" +
1546        "          </parameterTypeNames>" +
1547        "        </org.easymock.internal.MethodSerializationWrapper>" +
1548        "        <org.easymock.internal.MethodSerializationWrapper>" +
1549        "          <className>java.lang.Object</className>" +
1550        "          <methodName>hashCode</methodName>" +
1551        "          <parameterTypeNames/>" +
1552        "        </org.easymock.internal.MethodSerializationWrapper>" +
1553        "      </org.easymock.internal.ObjectMethodsFilter>" +
1554        "    </handler>" +
1555        "  </offerDao>" +
1556        "  <entityService class=\"dynamic-proxy\">" +
1557        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
1558        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1559        "      <org.easymock.internal.ObjectMethodsFilter>" +
1560        "        <default>" +
1561        "          <delegate>" +
1562        "            <control>" +
1563        "              <state class=\"org.easymock.internal.RecordState\">" +
1564        "                <lastInvocationUsed>true</lastInvocationUsed>" +
1565        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1566        "                  <behaviorLists/>" +
1567        "                  <stubResults/>" +
1568        "                  <nice>false</nice>" +
1569        "                  <checkOrder>false</checkOrder>" +
1570        "                  <isThreadSafe>true</isThreadSafe>" +
1571        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1572        "                  <position>0</position>" +
1573        "                </behavior>" +
1574        "              </state>" +
1575        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1576        "              <type>DEFAULT</type>" +
1577        "            </control>" +
1578        "          </delegate>" +
1579        "        </default>" +
1580        "        <org.easymock.internal.MethodSerializationWrapper>" +
1581        "          <className>java.lang.Object</className>" +
1582        "          <methodName>toString</methodName>" +
1583        "          <parameterTypeNames/>" +
1584        "        </org.easymock.internal.MethodSerializationWrapper>" +
1585        "        <org.easymock.internal.MethodSerializationWrapper>" +
1586        "          <className>java.lang.Object</className>" +
1587        "          <methodName>equals</methodName>" +
1588        "          <parameterTypeNames>" +
1589        "            <string>java.lang.Object</string>" +
1590        "          </parameterTypeNames>" +
1591        "        </org.easymock.internal.MethodSerializationWrapper>" +
1592        "        <org.easymock.internal.MethodSerializationWrapper>" +
1593        "          <className>java.lang.Object</className>" +
1594        "          <methodName>hashCode</methodName>" +
1595        "          <parameterTypeNames/>" +
1596        "        </org.easymock.internal.MethodSerializationWrapper>" +
1597        "      </org.easymock.internal.ObjectMethodsFilter>" +
1598        "    </handler>" +
1599        "  </entityService>" +
1600        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
1601        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
1602        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
1603        String paramsObjectStr = 
1604        "<object-array>" +
1605        "  <null/>" +
1606        "</object-array>";
1607        Object[] paramObjects = deserializeObject(paramsObjectStr);
1608        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
1609        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
1610    }
1611
1612    @Test
1613    public void testFindRelatedQualifierRoot19() throws Exception {
1614        String receivingObjectStr = 
1615        "<org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>" +
1616        "  <promotableItemFactory class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableItemFactoryImpl\">" +
1617        "    <useQtyOnlyTierCalculation>false</useQtyOnlyTierCalculation>" +
1618        "    <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\"/>" +
1619        "  </promotableItemFactory>" +
1620        "  <offerDao class=\"dynamic-proxy\">" +
1621        "    <interface>org.broadleafcommerce.core.offer.dao.OfferDao</interface>" +
1622        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1623        "      <org.easymock.internal.ObjectMethodsFilter>" +
1624        "        <default>" +
1625        "          <delegate>" +
1626        "            <control>" +
1627        "              <state class=\"org.easymock.internal.ReplayState\">" +
1628        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1629        "                  <behaviorLists>" +
1630        "                    <org.easymock.internal.UnorderedBehavior>" +
1631        "                      <results>" +
1632        "                        <org.easymock.internal.ExpectedInvocationAndResults>" +
1633        "                          <expectedInvocation>" +
1634        "                            <invocation serialization=\"custom\">" +
1635        "                              <org.easymock.internal.Invocation>" +
1636        "                                <default>" +
1637        "                                  <arguments/>" +
1638        "                                  <currentCaptures class=\"list\"/>" +
1639        "                                  <mock class=\"dynamic-proxy\" reference=\"../../../../../../../../../../../../../../../..\"/>" +
1640        "                                </default>" +
1641        "                                <org.easymock.internal.MethodSerializationWrapper>" +
1642        "                                  <className>org.broadleafcommerce.core.offer.dao.OfferDao</className>" +
1643        "                                  <methodName>createOrderItemPriceDetailAdjustment</methodName>" +
1644        "                                  <parameterTypeNames/>" +
1645        "                                </org.easymock.internal.MethodSerializationWrapper>" +
1646        "                              </org.easymock.internal.Invocation>" +
1647        "                            </invocation>" +
1648        "                            <matchers/>" +
1649        "                          </expectedInvocation>" +
1650        "                          <results>" +
1651        "                            <callCount>4</callCount>" +
1652        "                            <ranges>" +
1653        "                              <org.easymock.internal.Range>" +
1654        "                                <minimum>0</minimum>" +
1655        "                                <maximum>2147483647</maximum>" +
1656        "                              </org.easymock.internal.Range>" +
1657        "                            </ranges>" +
1658        "                            <results>" +
1659        "                              <org.easymock.internal.Result>" +
1660        "                                <value class=\"org.broadleafcommerce.core.offer.service.OfferDataItemProvider$3\"/>" +
1661        "                                <shouldFillInStackTrace>false</shouldFillInStackTrace>" +
1662        "                              </org.easymock.internal.Result>" +
1663        "                            </results>" +
1664        "                          </results>" +
1665        "                        </org.easymock.internal.ExpectedInvocationAndResults>" +
1666        "                      </results>" +
1667        "                      <checkOrder>false</checkOrder>" +
1668        "                    </org.easymock.internal.UnorderedBehavior>" +
1669        "                  </behaviorLists>" +
1670        "                  <stubResults/>" +
1671        "                  <nice>false</nice>" +
1672        "                  <checkOrder>false</checkOrder>" +
1673        "                  <isThreadSafe>true</isThreadSafe>" +
1674        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1675        "                  <position>0</position>" +
1676        "                </behavior>" +
1677        "                <lock>" +
1678        "                  <sync class=\"java.util.concurrent.locks.ReentrantLock$NonfairSync\" serialization=\"custom\">" +
1679        "                    <java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1680        "                      <default>" +
1681        "                        <state>0</state>" +
1682        "                      </default>" +
1683        "                    </java.util.concurrent.locks.AbstractQueuedSynchronizer>" +
1684        "                    <java.util.concurrent.locks.ReentrantLock_-Sync>" +
1685        "                      <default/>" +
1686        "                    </java.util.concurrent.locks.ReentrantLock_-Sync>" +
1687        "                  </sync>" +
1688        "                </lock>" +
1689        "              </state>" +
1690        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1691        "              <type>DEFAULT</type>" +
1692        "            </control>" +
1693        "          </delegate>" +
1694        "        </default>" +
1695        "        <org.easymock.internal.MethodSerializationWrapper>" +
1696        "          <className>java.lang.Object</className>" +
1697        "          <methodName>toString</methodName>" +
1698        "          <parameterTypeNames/>" +
1699        "        </org.easymock.internal.MethodSerializationWrapper>" +
1700        "        <org.easymock.internal.MethodSerializationWrapper>" +
1701        "          <className>java.lang.Object</className>" +
1702        "          <methodName>equals</methodName>" +
1703        "          <parameterTypeNames>" +
1704        "            <string>java.lang.Object</string>" +
1705        "          </parameterTypeNames>" +
1706        "        </org.easymock.internal.MethodSerializationWrapper>" +
1707        "        <org.easymock.internal.MethodSerializationWrapper>" +
1708        "          <className>java.lang.Object</className>" +
1709        "          <methodName>hashCode</methodName>" +
1710        "          <parameterTypeNames/>" +
1711        "        </org.easymock.internal.MethodSerializationWrapper>" +
1712        "      </org.easymock.internal.ObjectMethodsFilter>" +
1713        "    </handler>" +
1714        "  </offerDao>" +
1715        "  <entityService class=\"dynamic-proxy\">" +
1716        "    <interface>org.broadleafcommerce.common.service.GenericEntityService</interface>" +
1717        "    <handler class=\"org.easymock.internal.ObjectMethodsFilter\" serialization=\"custom\">" +
1718        "      <org.easymock.internal.ObjectMethodsFilter>" +
1719        "        <default>" +
1720        "          <delegate>" +
1721        "            <control>" +
1722        "              <state class=\"org.easymock.internal.RecordState\">" +
1723        "                <lastInvocationUsed>true</lastInvocationUsed>" +
1724        "                <behavior class=\"org.easymock.internal.MocksBehavior\">" +
1725        "                  <behaviorLists/>" +
1726        "                  <stubResults/>" +
1727        "                  <nice>false</nice>" +
1728        "                  <checkOrder>false</checkOrder>" +
1729        "                  <isThreadSafe>true</isThreadSafe>" +
1730        "                  <shouldBeUsedInOneThread>false</shouldBeUsedInOneThread>" +
1731        "                  <position>0</position>" +
1732        "                </behavior>" +
1733        "              </state>" +
1734        "              <behavior class=\"org.easymock.internal.MocksBehavior\" reference=\"../state/behavior\"/>" +
1735        "              <type>DEFAULT</type>" +
1736        "            </control>" +
1737        "          </delegate>" +
1738        "        </default>" +
1739        "        <org.easymock.internal.MethodSerializationWrapper>" +
1740        "          <className>java.lang.Object</className>" +
1741        "          <methodName>toString</methodName>" +
1742        "          <parameterTypeNames/>" +
1743        "        </org.easymock.internal.MethodSerializationWrapper>" +
1744        "        <org.easymock.internal.MethodSerializationWrapper>" +
1745        "          <className>java.lang.Object</className>" +
1746        "          <methodName>equals</methodName>" +
1747        "          <parameterTypeNames>" +
1748        "            <string>java.lang.Object</string>" +
1749        "          </parameterTypeNames>" +
1750        "        </org.easymock.internal.MethodSerializationWrapper>" +
1751        "        <org.easymock.internal.MethodSerializationWrapper>" +
1752        "          <className>java.lang.Object</className>" +
1753        "          <methodName>hashCode</methodName>" +
1754        "          <parameterTypeNames/>" +
1755        "        </org.easymock.internal.MethodSerializationWrapper>" +
1756        "      </org.easymock.internal.ObjectMethodsFilter>" +
1757        "    </handler>" +
1758        "  </entityService>" +
1759        "  <promotableOfferUtility class=\"org.broadleafcommerce.core.offer.service.discount.domain.PromotableOfferUtilityImpl\" reference=\"../promotableItemFactory/promotableOfferUtility\"/>" +
1760        "</org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl>";
1761        org.broadleafcommerce.core.offer.service.OfferServiceUtilitiesImpl receivingObject = deserializeObject(receivingObjectStr);
1762        String paramsObjectStr = 
1763        "<object-array>" +
1764        "  <null/>" +
1765        "</object-array>";
1766        Object[] paramObjects = deserializeObject(paramsObjectStr);
1767        org.broadleafcommerce.core.order.domain.OrderItem paramObject1 = (org.broadleafcommerce.core.order.domain.OrderItem) paramObjects[0];
1768        Assert.assertEquals(null, receivingObject.findRelatedQualifierRoot(paramObject1));
1769    }
1770}
Full Screen
copy
1/*
2 * Copyright 2001-2009 OFFIS, Tammo Freese
3 * 
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * 
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 * 
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.easymock.internal;
17
18import java.io.IOException;
19import java.io.Serializable;
20import java.lang.reflect.Method;
21import java.util.HashMap;
22import java.util.Map;
23
24import org.easymock.ArgumentsMatcher;
25import org.easymock.MockControl;
26
27@SuppressWarnings("deprecation")
28public class LegacyMatcherProvider implements Serializable {
29
30    private static final long serialVersionUID = -4143082656571251917L;
31
32    private ArgumentsMatcher defaultMatcher;
33
34    private boolean defaultMatcherSet;
35
36    private transient Map<Method, ArgumentsMatcher> matchers = new HashMap<Method, ArgumentsMatcher>();
37
38    public ArgumentsMatcher getMatcher(Method method) {
39        if (!matchers.containsKey(method)) {
40            if (!defaultMatcherSet) {
41                setDefaultMatcher(MockControl.EQUALS_MATCHER);
42            }
43            matchers.put(method, defaultMatcher);
44        }
45        return matchers.get(method);
46    }
47
48    public void setDefaultMatcher(ArgumentsMatcher matcher) {
49        if (defaultMatcherSet) {
50            throw new RuntimeExceptionWrapper(
51                    new IllegalStateException(
52                            "default matcher can only be set once directly after creation of the MockControl"));
53        }
54        defaultMatcher = matcher;
55        defaultMatcherSet = true;
56    }
57
58    public void setMatcher(Method method, ArgumentsMatcher matcher) {
59        if (matchers.containsKey(method) && matchers.get(method) != matcher) {
60            throw new RuntimeExceptionWrapper(new IllegalStateException(
61                    "for method "
62                            + method.getName()
63                            + "("
64                            + (method.getParameterTypes().length == 0 ? ""
65                                    : "...")
66                            + "), a matcher has already been set"));
67        }
68        matchers.put(method, matcher);
69    }
70
71    @SuppressWarnings("unchecked")
72    private void readObject(java.io.ObjectInputStream stream)
73            throws IOException, ClassNotFoundException {
74        stream.defaultReadObject();
75        Map<MethodSerializationWrapper, ArgumentsMatcher> map = (Map<MethodSerializationWrapper, ArgumentsMatcher>) stream
76                .readObject();
77        matchers = new HashMap<Method, ArgumentsMatcher>(map.size());
78        for (Map.Entry<MethodSerializationWrapper, ArgumentsMatcher> entry : map
79                .entrySet()) {
80            try {
81                Method method = entry.getKey().getMethod();
82                matchers.put(method, entry.getValue());
83            } catch (NoSuchMethodException e) {
84                // ///CLOVER:OFF
85                throw new IOException(e.toString());
86                // ///CLOVER:ON
87            }
88        }
89    }
90
91    private void writeObject(java.io.ObjectOutputStream stream)
92            throws IOException {
93        stream.defaultWriteObject();
94        Map<MethodSerializationWrapper, ArgumentsMatcher> map = new HashMap<MethodSerializationWrapper, ArgumentsMatcher>(
95                matchers.size());
96        for (Map.Entry<Method, ArgumentsMatcher> matcher : matchers.entrySet()) {
97            map.put(new MethodSerializationWrapper(matcher.getKey()), matcher
98                    .getValue());
99        }
100        stream.writeObject(map);
101    }
102}
103
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest

Most used method in MethodSerializationWrapper

Trigger code on LambdaTest Cloud Grid

Execute automation tests with on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free
LambdaTestX

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie
Sarah

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)