public class StrutsConversationArbitratorTest {
@Test
public void testGetPackageBasedConversations() {
StrutsConversationArbitrator arbitrator = new StrutsConversationArbitrator();
ActionProvider actionProvider = new ActionProvider() {
private static final long serialVersionUID = 1L;
@Override
public Set<Class<?>> getActionClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(MockConventionController.class);
classes.add(MockConversationController.class);
return classes;
}
};
arbitrator.setUsePackageNesting(true);
arbitrator.setActionProvider(actionProvider);
assertTrue(arbitrator.getPackageBasedConversations(
MockConversationControllerInterface.class, "Controller")
.contains("mock-convention"));
}