4343import static org .junit .Assert .*;
4444
4545/**
46- * Integration tests for {@link RemoteEntityFileStorage }.
46+ * Integration tests for {@link BuckieEntityFileStorage }.
4747 *
4848 * <p>Pure-logic tests (buildKey, getFileName, etc.) always run.
4949 * HTTP tests are skipped automatically via {@code Assume.assumeTrue}
5959 * Maven example: {@code mvn test -DSFS_URL=http://my-sfs:8081 -DSFS_BUCKET=test}
6060 * </p>
6161 */
62- public class RemoteEntityFileStorageTest {
62+ public class BuckieEntityFileStorageTest {
6363
6464 private static String sfsUrl ;
6565 private static String sfsBucket ;
6666 private static String sfsIdentity ;
6767 private static String sfsSecret ;
6868
69- private RemoteEntityFileStorage storage ;
69+ private BuckieEntityFileStorage storage ;
7070
7171 // ── Setup ─────────────────────────────────────────────────────────────────
7272
7373 @ BeforeClass
7474 public static void readConfiguration () {
75- sfsUrl = systemOrEnv (RemoteEntityFileStorage .SFS_URL , "http://localhost:8500" );
76- sfsBucket = systemOrEnv (RemoteEntityFileStorage .SFS_BUCKET , "test" );
77- sfsIdentity = systemOrEnv (RemoteEntityFileStorage .SFS_IDENTITY , "test" );
78- sfsSecret = systemOrEnv (RemoteEntityFileStorage .SFS_SECRET , "test" );
75+ sfsUrl = systemOrEnv (BuckieEntityFileStorage .SFS_URL , "http://localhost:8500" );
76+ sfsBucket = systemOrEnv (BuckieEntityFileStorage .SFS_BUCKET , "test" );
77+ sfsIdentity = systemOrEnv (BuckieEntityFileStorage .SFS_IDENTITY , "test" );
78+ sfsSecret = systemOrEnv (BuckieEntityFileStorage .SFS_SECRET , "test" );
7979
8080 System .out .println ("[SFS Test] URL=" + sfsUrl + " | BUCKET=" + sfsBucket );
8181 }
8282
8383 @ Before
8484 public void setUp () {
8585 MockEnvironment env = new MockEnvironment ();
86- env .setProperty (RemoteEntityFileStorage .SFS_URL , sfsUrl );
87- env .setProperty (RemoteEntityFileStorage .SFS_BUCKET , sfsBucket );
88- env .setProperty (RemoteEntityFileStorage .SFS_IDENTITY , sfsIdentity );
89- env .setProperty (RemoteEntityFileStorage .SFS_SECRET , sfsSecret );
86+ env .setProperty (BuckieEntityFileStorage .SFS_URL , sfsUrl );
87+ env .setProperty (BuckieEntityFileStorage .SFS_BUCKET , sfsBucket );
88+ env .setProperty (BuckieEntityFileStorage .SFS_IDENTITY , sfsIdentity );
89+ env .setProperty (BuckieEntityFileStorage .SFS_SECRET , sfsSecret );
9090
9191 var local = new LocalEntityFileStorage (noOpParameters (), new InMemoryCrudService (), env );
9292
93- storage = new RemoteEntityFileStorage (local , noOpParameters (), new InMemoryCrudService (), env );
93+ storage = new BuckieEntityFileStorage (local , noOpParameters (), new InMemoryCrudService (), env );
9494 }
9595
9696 // ── Pure-logic tests (no server required) ─────────────────────────────────
9797
9898 @ Test
9999 public void testGetId () {
100- assertEquals (RemoteEntityFileStorage .ID , storage .getId ());
100+ assertEquals (BuckieEntityFileStorage .ID , storage .getId ());
101101 }
102102
103103 @ Test
@@ -127,7 +127,7 @@ public void testBuildKey_withSubfolder() {
127127 @ Test
128128 public void testGetFileName_withSpacesAndDashes () {
129129 EntityFile ef = buildEntityFile ("My File-Final.pdf" , null , 1L );
130- String name = RemoteEntityFileStorage .getFileName (ef );
130+ String name = BuckieEntityFileStorage .getFileName (ef );
131131
132132 assertFalse ("File name must not contain spaces" , name .contains (" " ));
133133 assertFalse ("File name base must not contain dashes" ,
@@ -137,7 +137,7 @@ public void testGetFileName_withSpacesAndDashes() {
137137 @ Test
138138 public void testGetFileName_withAccentsAndSpecialChars () {
139139 EntityFile ef = buildEntityFile ("Ñoño Ávido Murió.pdf" , null , 1L );
140- String name = RemoteEntityFileStorage .getFileName (ef );
140+ String name = BuckieEntityFileStorage .getFileName (ef );
141141
142142 assertFalse ("File name must not contain ñ" , name .contains ("ñ" ));
143143 assertFalse ("File name must not contain á" , name .contains ("á" ));
@@ -150,25 +150,25 @@ public void testGetFileName_usesStoredFileNameWhenSet() {
150150 EntityFile ef = buildEntityFile ("original.pdf" , null , 1L );
151151 ef .setStoredFileName ("custom_stored_name.pdf" );
152152
153- String name = RemoteEntityFileStorage .getFileName (ef );
153+ String name = BuckieEntityFileStorage .getFileName (ef );
154154
155155 assertEquals ("Must use storedFileName when it is set" , "custom_stored_name.pdf" , name );
156156 }
157157
158158 @ Test
159159 public void testGetFileName_withoutSubfolder () {
160160 EntityFile ef = buildEntityFile ("doc.txt" , null , 1L );
161- String name = RemoteEntityFileStorage .getFileName (ef );
161+ String name = BuckieEntityFileStorage .getFileName (ef );
162162
163163 assertFalse ("Without subfolder the name must not start with /" , name .startsWith ("/" ));
164164 assertTrue ("Name must contain the uuid" , name .contains (ef .getUuid ()));
165165 }
166166
167167 @ Test
168168 public void testGetAccountFolderName () {
169- assertEquals ("account42/" , RemoteEntityFileStorage .getAccountFolderName (42L ));
170- assertEquals ("account1/" , RemoteEntityFileStorage .getAccountFolderName (1L ));
171- assertEquals ("account999/" , RemoteEntityFileStorage .getAccountFolderName (999L ));
169+ assertEquals ("account42/" , BuckieEntityFileStorage .getAccountFolderName (42L ));
170+ assertEquals ("account1/" , BuckieEntityFileStorage .getAccountFolderName (1L ));
171+ assertEquals ("account999/" , BuckieEntityFileStorage .getAccountFolderName (999L ));
172172 }
173173
174174 @ Test
@@ -336,7 +336,7 @@ public void testUploadAndDownloadUrl_areConsistent() {
336336 storage .upload (ef , info );
337337
338338 StoredEntityFile stored = storage .download (ef );
339- String url = stored instanceof RemoteEntityFileStorage . RemoteStoredEntityFile r ? r .getRemoteUrl () : stored .getUrl ();
339+ String url = stored instanceof BuckieEntityFileStorage . BuckieStoredEntityFile r ? r .getRemoteUrl () : stored .getUrl ();
340340
341341 // The URL returned by download() must point to the same resource that was uploaded
342342 assertNotNull (url );
0 commit comments