public void testSaveKeyValues_new() {
final String key = "foo";
List<String> values = new ArrayList<String>();
values.add("bar");
values.add("baz");
PortalPreference fooBar = new PortalPreferenceImpl(key, values);
PortalPreferenceImpl fooBarSaved = new PortalPreferenceImpl(key, values);
expect(repository.getByKey(key)).andReturn(null).once();
expect(repository.save(fooBar)).andReturn(fooBarSaved).once();
replay(repository);