@Test
public void testSaveKeyValue_new() {
final String key = "foo";
final String value = "bar";
PortalPreference fooBar = new PortalPreferenceImpl(key, value);
PortalPreferenceImpl fooBarSaved = new PortalPreferenceImpl(key, value);
expect(repository.getByKey(key)).andReturn(null).once();
expect(repository.save(fooBar)).andReturn(fooBarSaved).once();