@Test
public void testGetSelections() throws ReportDataFactoryException, BeanException {

  final Map<String, Object> inputs = new HashMap<String, Object>() {
    {
      put( "unchanged_parent", "value0" );
      put( "changed_unverified", "value" );
      put( "unchanged_unverified", "value1" );
      put( "verified", "value2" );
      put( "plain", "value3" );
    }
  };
  final Set<String> changedParameters = Collections.singleton( "changed_unverified" );
  final ParameterDefinitionEntry changed =
    new DefaultListParameter( "query", "keyColumn", "textColumn", "changed_unverified", false, false, String.class );
  final ParameterDefinitionEntry unchanged =
    new DefaultListParameter( "query", "keyColumn", "textColumn", "unchanged_unverified", false, false,
      String.class );
  final ParameterDefinitionEntry verified =
    new DefaultListParameter( "query", "keyColumn", "textColumn", "verified", false, true, String.class );
  final ParameterDefinitionEntry plain = new PlainParameter( "plain", String.class );
  final ParameterDependencyGraph dependencyGraph = new ParameterDependencyGraph( "unchanged_parent",
    "changed_unverified", "unchanged_unverified", "verified", "plain" );
  dependencyGraph.addDependency( "unchanged_parent", "unchanged_unverified" );
  final ParameterDependencyGraph noDependencyGraph = new ParameterDependencyGraph();
  //Initial call
  final Object changedResult = handler.getSelections( changed, new HashSet<>(), dependencyGraph, inputs );
  final Object unchangedResult = handler.getSelections( unchanged, new HashSet<>(), dependencyGraph, inputs );
  final Object verifiedResult = handler.getSelections( verified, new HashSet<>(), dependencyGraph, inputs );
  final Object plainResult = handler.getSelections( plain, new HashSet<>(), dependencyGraph, inputs );
  assertEquals( "value", changedResult );
  assertEquals( "value1", unchangedResult );
  assertEquals( "value2", verifiedResult );
  assertEquals( "value3", plainResult );
  //Changed call
  final Object changedResult1 = handler.getSelections( changed, changedParameters, dependencyGraph, inputs );
  final Object unchangedResult1 = handler.getSelections( unchanged, changedParameters, dependencyGraph, inputs );
  final Object verifiedResult1 = handler.getSelections( verified, changedParameters, dependencyGraph, inputs );
  final Object plainResult1 = handler.getSelections( plain, changedParameters, dependencyGraph, inputs );
  assertEquals( "value", changedResult1 );
  assertEquals( null, unchangedResult1 );
  assertEquals( "value2", verifiedResult1 );
  assertEquals( "value3", plainResult1 );
  //Changed call with no dependencies
  final Object changedResult2 = handler.getSelections( changed, changedParameters, noDependencyGraph, inputs );
  final Object unchangedResult2 = handler.getSelections( unchanged, changedParameters, noDependencyGraph, inputs );
  final Object verifiedResult2 = handler.getSelections( verified, changedParameters, noDependencyGraph, inputs );
  final Object plainResult2 = handler.getSelections( plain, changedParameters, noDependencyGraph, inputs );
  assertEquals( "value", changedResult2 );
  assertEquals( "value1", unchangedResult2 );
  assertEquals( "value2", verifiedResult2 );
  assertEquals( "value3", plainResult2 );
}