storageForm.setName("name");
storageForm.setBaseLocation("new/baselocation");
storageForm.setStorageType(StorageType.LOCAL);
storageForm.setEditing(true);
LocalStorageConfiguration storageConfiguration = new LocalStorageConfiguration();
storageConfiguration.setId(1l);
storageConfiguration.setBaseLocation("baseLocation");
storageConfiguration.setName("name");
storageConfiguration.setStorageType(StorageType.LOCAL);
Mockito.when(storageConfigurationService.getByName(storageForm.getName())).thenReturn(storageConfiguration);
Mockito.when(storageConfigurationService.get(storageForm.getId())).thenReturn(storageConfiguration);
validator.validate(storageForm, errors);