@Test public void test_get_sub_parameter_values_as_string_single_match() throws Exception { bo.setValue("foo= f1, f2 , f3; bar=b1; baz=z1"); when(dataObjectService.find(Matchers.argThat(new ClassOrSubclassMatcher<ParameterBo>( ParameterBo.class)), any(QueryByCriteria.class))).thenReturn(bo); Collection<String> values = getParameterRepositoryService().getSubParameterValuesAsString(key, "foo"); assertTrue(values.size() == 3); assertTrue(values.contains("f1")); assertTrue(values.contains("f2")); assertTrue(values.contains("f3")); assertImmutableList(values); verify(dataObjectService, times(1)).find(Matchers.argThat(new ClassOrSubclassMatcher<ParameterBo>( ParameterBo.class)), any(QueryByCriteria.class)); }
@Override public Collection<String> getSubParameterValuesAsString(ParameterKey key, String subParameterName) { return splitOn(getSubParameterValueAsString(key, subParameterName), ","); }
ParameterRepositoryServiceImpl implements ParameterRepositoryService { @Override public Collection<String> getSubParameterValuesAsString(ParameterKey key, String subParameterName) { return splitOn(getSubParameterValueAsString(key, subParameterName), ","); } }
ParameterRepositoryServiceImpl implements ParameterRepositoryService { @Override public Collection<String> getSubParameterValuesAsString(ParameterKey key, String subParameterName) { return splitOn(getSubParameterValueAsString(key, subParameterName), ","); }  }
ParameterRepositoryServiceImpl implements ParameterRepositoryService { @Override public Collection<String> getSubParameterValuesAsString(ParameterKey key, String subParameterName) { return splitOn(getSubParameterValueAsString(key, subParameterName), ","); }  @Override @Transactional Parameter createParameter(Parameter parameter); @Override @Transactional Parameter updateParameter(Parameter parameter); @Override Parameter getParameter(ParameterKey key); @Override String getParameterValueAsString(ParameterKey key); @Override Boolean getParameterValueAsBoolean(ParameterKey key); @Override Collection<String> getParameterValuesAsString(ParameterKey key); @Override String getSubParameterValueAsString(ParameterKey key, String subParameterName); @Override Collection<String> getSubParameterValuesAsString(ParameterKey key, String subParameterName); @Override ParameterQueryResults findParameters(QueryByCriteria queryByCriteria); DataObjectService getDataObjectService(); @Required void setDataObjectService(DataObjectService dataObjectService); }
ParameterRepositoryServiceImpl implements ParameterRepositoryService { @Override public Collection<String> getSubParameterValuesAsString(ParameterKey key, String subParameterName) { return splitOn(getSubParameterValueAsString(key, subParameterName), ","); }  @Override @Transactional Parameter createParameter(Parameter parameter); @Override @Transactional Parameter updateParameter(Parameter parameter); @Override Parameter getParameter(ParameterKey key); @Override String getParameterValueAsString(ParameterKey key); @Override Boolean getParameterValueAsBoolean(ParameterKey key); @Override Collection<String> getParameterValuesAsString(ParameterKey key); @Override String getSubParameterValueAsString(ParameterKey key, String subParameterName); @Override Collection<String> getSubParameterValuesAsString(ParameterKey key, String subParameterName); @Override ParameterQueryResults findParameters(QueryByCriteria queryByCriteria); DataObjectService getDataObjectService(); @Required void setDataObjectService(DataObjectService dataObjectService);  }