diff --git a/t/slubsipbuilderbagit.t b/t/slubsipbuilderbagit.t
index 886f5b13a8195c523562e3129a799c662f0a6cad..cd452c89804663ef14bd98bdf1274e0aafdb9346 100644
--- a/t/slubsipbuilderbagit.t
+++ b/t/slubsipbuilderbagit.t
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use diagnostics;
 
-use Test::More tests => 126;
+use Test::More tests => 123;
 use Test::Output;
 use Test::Exception;
 use Test::File;
@@ -22,7 +22,7 @@ sub workaroundBagInfoTXT($$$){
     my $file_path = $_[0];
     my $key = $_[1];
     my $value = $_[2];
-    my $file_name = SLUB::LZA::SIPBuilderBagIt::getFileName($file_path);
+    my $file_name = path($file_path)->basename();
     
     # read a data file into an array
     open my $handle, '<', $file_path;
@@ -47,7 +47,7 @@ sub workaroundTagmanifestMD5($$$){
     my $file_path = $_[0];
     my $key = $_[1];
     my $value = $_[2];
-    my $file_name = SLUB::LZA::SIPBuilderBagIt::getFileName($file_path);
+    my $file_name = path($file_path)->basename();
     
     # read a data file into an array
     open my $handle, '<', $file_path;
@@ -72,7 +72,7 @@ sub workaroundTagmanifestSHA512($$$){
     my $file_path = $_[0];
     my $key = $_[1];
     my $value = $_[2];
-    my $file_name = SLUB::LZA::SIPBuilderBagIt::getFileName($file_path);
+    my $file_name = path($file_path)->basename();
     
     # read a data file into an array
     open my $handle, '<', $file_path;
@@ -763,10 +763,6 @@ is(equalFilesByIgnoringCRLF_LF($output_bubbleFilePath, $input_bubbleFilePath), 1
 is(equalFilesByIgnoringCRLF_LF($output_sameModsFilePath, $input_modsFilePath), 1, "copyFilesToMeta() file $input_modsFilePath is identical to $output_sameModsFilePath");
 is(equalFilesByIgnoringCRLF_LF($output_sameRightsFilePath, $input_rightsFilePath), 1, "copyFilesToMeta() file $input_rightsFilePath is identical to $output_sameRightsFilePath");
 #
-is(SLUB::LZA::SIPBuilderBagIt::getFileName($input_bubbleFilePath), "bubble.xml", "getFileName()");
-throws_ok{ SLUB::LZA::SIPBuilderBagIt::getFileName(undef); } qr/path with file name is not defined/, "getFileName(\$file_name), file_name undef";
-throws_ok{ SLUB::LZA::SIPBuilderBagIt::getFileName(""); } qr/invalid parameters/, "getFileName(), invalid parameters";
-#
 my $xsdName = "rights1.xsd";
 my $input_rights = path(__FILE__)->parent->parent->child('export_dir_kitodo')->child('bagit')->child("rights");
 is(SLUB::LZA::SIPBuilderBagIt::validateRightsXML($input_rights . "/Fallbeispiel-01.xml", $xsdName), 1, "validateRightsXML() Fallbeispiel-01.xml according to $xsdName");