DataBridgeController { protected String getStorageNameFromManifest(DataBridgeBaseManifestDto manifest) { String storageName; if (StringUtils.isNotBlank(manifest.getStorageName())) { storageName = manifest.getStorageName().trim(); } else { storageName = StorageEntity.MANAGED_STORAGE; } return storageName; }   static final Integer MAX_THREADS; static final Integer MIN_THREADS; }
@Test public void testGetStorageNameFromManifestAssertReturnStorageName() { DataBridgeController dataBridgeController = new BasicDataBridgeController(); DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto(); manifest.setStorageName("test"); String value = dataBridgeController.getStorageNameFromManifest(manifest); assertEquals("test", value); }
@Test public void testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameNull() { DataBridgeController dataBridgeController = new BasicDataBridgeController(); DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto(); manifest.setStorageName(null); String value = dataBridgeController.getStorageNameFromManifest(manifest); assertEquals(StorageEntity.MANAGED_STORAGE, value); }
@Test public void testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNull() { DataBridgeController dataBridgeController = new BasicDataBridgeController(); DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto(); String value = dataBridgeController.getStorageNameFromManifest(manifest); assertEquals(StorageEntity.MANAGED_STORAGE, value); }
@Test public void testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameBlank() { DataBridgeController dataBridgeController = new BasicDataBridgeController(); DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto(); manifest.setStorageName(BLANK_TEXT); String value = dataBridgeController.getStorageNameFromManifest(manifest); assertEquals(StorageEntity.MANAGED_STORAGE, value); }