diff --git a/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java b/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java index 8f2a94406..57eb37414 100644 --- a/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java +++ b/ccm-cms/src/test/java/org/librecms/contentsection/ContentItemManagerTest.java @@ -336,13 +336,13 @@ public class ContentItemManagerTest { * is called with {@code null} for the folder in which the new item is * created. */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = NullPointerException.class) @InSequence(1500) @UsingDataSet("datasets/org/librecms/contentsection/" + "ContentItemManagerTest/data.xml") @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + "ContentItemManagerTest/data.xml") - @ShouldThrowException(IllegalArgumentException.class) + @ShouldThrowException(NullPointerException.class) public void createItemFolderIsNull() { shiro.getSystemUser().execute(() -> { final ContentSection section = sectionRepo @@ -508,13 +508,13 @@ public class ContentItemManagerTest { * throws an {@link IllegalArgumentException} if called with {@code null} * for the folder in which the new item is created. */ - @Test(expected = IllegalArgumentException.class) + @Test(expected = NullPointerException.class) @InSequence(2600) @UsingDataSet("datasets/org/librecms/contentsection/" + "ContentItemManagerTest/data.xml") @ShouldMatchDataSet("datasets/org/librecms/contentsection/" + "ContentItemManagerTest/data.xml") - @ShouldThrowException(IllegalArgumentException.class) + @ShouldThrowException(NullPointerException.class) public void createItemFolderIsNullWithWorkflow() { shiro.getSystemUser().execute(() -> { final ContentSection section = sectionRepo diff --git a/ccm-cms/src/test/java/org/librecms/contentsection/FolderManagerTest.java b/ccm-cms/src/test/java/org/librecms/contentsection/FolderManagerTest.java index 3f5822d23..5e8e2cf16 100644 --- a/ccm-cms/src/test/java/org/librecms/contentsection/FolderManagerTest.java +++ b/ccm-cms/src/test/java/org/librecms/contentsection/FolderManagerTest.java @@ -390,26 +390,26 @@ public class FolderManagerTest { folderManager.moveFolder(folder, folder); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = NullPointerException.class) @UsingDataSet("datasets/org/librecms/contentsection/" + "FolderManagerTest/data.xml") @ShouldMatchDataSet( value = "datasets/org/librecms/contentsection/" + "FolderManagerTest/data.xml") - @ShouldThrowException(IllegalArgumentException.class) + @ShouldThrowException(NullPointerException.class) @InSequence(3200) public void moveFolderNull() { final Folder target = folderRepo.findById(-2010L).get(); folderManager.moveFolder(null, target); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = NullPointerException.class) @UsingDataSet("datasets/org/librecms/contentsection/" + "FolderManagerTest/data.xml") @ShouldMatchDataSet( value = "datasets/org/librecms/contentsection/" + "FolderManagerTest/data.xml") - @ShouldThrowException(IllegalArgumentException.class) + @ShouldThrowException(NullPointerException.class) @InSequence(3210) public void moveFolderTargetNull() { final Folder folder = folderRepo.findById(-2008L).get();