@Test
public void testSaveException() throws Exception {

	IPreferencesMngr mock = Mockito.mock( IPreferencesMngr.class );
	Mockito.doThrow( new IOException( "For test" )).when( mock ).save( Mockito.anyString(), Mockito.anyString());
	this.manager.setPreferencesMngr( mock );
	Response resp = this.resource.savePreference( "my-key", "my-value" );
	Assert.assertEquals( Status.INTERNAL_SERVER_ERROR.getStatusCode(), resp.getStatus());
}