1
2
3
4
5
6
7 package org.mule.tck.testmodels.fruit;
8
9 import java.util.ArrayList;
10 import java.util.Collections;
11 import java.util.List;
12
13 public class FruitLover
14 {
15 private final List eatList = Collections.synchronizedList(new ArrayList());
16 private final String catchphrase;
17
18 public FruitLover(String catchphrase)
19 {
20 this.catchphrase = catchphrase;
21 }
22
23 public void eatFruit(Fruit fruit)
24 {
25 fruit.bite();
26 eatList.add(fruit.getClass());
27 }
28
29 public List getEatList()
30 {
31 return eatList;
32 }
33
34 public String speak()
35 {
36 return catchphrase;
37 }
38 }