Repository: Wikidata/Wikidata-Toolkit
Pull request #536 (2021-02-12 07:08:20)

Upgraded to JUnit5
Per #529. I had to upgrade okhttp to 5.0 alpha in order to get JUnit5-compatible mockwebserver. If that is a problem, I can look for other ways to solve the mockwebserver problem.

codecov[bot]: # [Codecov](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/pull/536?src=pr&el=h1) Report
> Merging [#536](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/pull/536?src=pr&el=desc) (60a755b) into [master](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/commit/00d251e2b98759dccc3c5941716d559bacb54835?el=desc) (00d251e) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/pull/536/graphs/tree.svg?width=650&height=150&src=pr&token=QtTNJdTAbO)](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/pull/536?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master     #536   +/-   ##
=========================================
  Coverage     81.04%   81.04%           
  Complexity     2088     2088           
=========================================
  Files           149      149           
  Lines          7306     7306           
  Branches        895      895           
=========================================
  Hits           5921     5921           
  Misses         1116     1116           
  Partials        269      269           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/pull/536?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/pull/536?src=pr&el=footer). Last update [00d251e...fd8df7b](https://codecov.io/gh/Wikidata/Wikidata-Toolkit/pull/536?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/pom.xml b/pom.xml
index ca0f495c..b312c689 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,22 +76,29 @@
 		<apacheCommonsLangVersion>3.10</apacheCommonsLangVersion>
 		<apacheCommonsIOVersion>2.6</apacheCommonsIOVersion>
 		<jacksonVersion>2.10.3</jacksonVersion>
-		<junitVersion>4.13.1</junitVersion>
+		<junitVersion>5.7.1</junitVersion>
+		<hamcrestVersion>1.3</hamcrestVersion>
 		<mockitoVersion>1.10.19</mockitoVersion>
 		<rdf4jVersion>3.1.3</rdf4jVersion>
 		<slf4jVersion>1.7.30</slf4jVersion>
 		<threetenVersion>1.5.0</threetenVersion>
 		<okhttpSignpostVersion>1.1.0</okhttpSignpostVersion>
-		<okhttpVersion>4.2.2</okhttpVersion>
+		<okhttpVersion>5.0.0-alpha.2</okhttpVersion>
 	</properties>
 
 	<dependencies>
 		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
+			<groupId>org.junit.jupiter</groupId>
+			<artifactId>junit-jupiter</artifactId>
 			<version>${junitVersion}</version>
 			<scope>test</scope>
 		</dependency>
+		<dependency>
+			<groupId>org.hamcrest</groupId>
+			<artifactId>hamcrest-core</artifactId>
+			<version>${hamcrestVersion}</version>
+			<scope>test</scope>
+		</dependency>
 		<dependency>
 			<groupId>org.mockito</groupId>
 			<artifactId>mockito-core</artifactId>
@@ -114,6 +121,11 @@
 	<build>
 		<pluginManagement>
 			<plugins>
+				<plugin>
+					<!-- Older surefire versions did not support JUnit 5. -->
+					<artifactId>maven-surefire-plugin</artifactId>
+					<version>2.22.2</version>
+				</plugin>
 				<plugin>
 					<groupId>org.codehaus.mojo</groupId>
 					<artifactId>license-maven-plugin</artifactId>
diff --git a/wdtk-wikibaseapi/pom.xml b/wdtk-wikibaseapi/pom.xml
index 19be8ef0..e1682fcb 100644
--- a/wdtk-wikibaseapi/pom.xml
+++ b/wdtk-wikibaseapi/pom.xml
@@ -39,7 +39,7 @@
 		</dependency>
 		<dependency>
 			<groupId>com.squareup.okhttp3</groupId>
-			<artifactId>mockwebserver</artifactId>
+			<artifactId>mockwebserver3-junit5</artifactId>
 			<version>${okhttpVersion}</version>
 			<scope>test</scope>
 		</dependency>


Test patch:
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelConverterTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelConverterTest.java
index 18ef7db3..9c1ddf41 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelConverterTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelConverterTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,16 +18,45 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.implementation.*;
-import org.wikidata.wdtk.datamodel.interfaces.*;
-
-import static org.junit.Assert.assertEquals;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl;
+import org.wikidata.wdtk.datamodel.implementation.GlobeCoordinatesValueImpl;
+import org.wikidata.wdtk.datamodel.implementation.ItemIdValueImpl;
+import org.wikidata.wdtk.datamodel.implementation.MonolingualTextValueImpl;
+import org.wikidata.wdtk.datamodel.implementation.PropertyIdValueImpl;
+import org.wikidata.wdtk.datamodel.implementation.QuantityValueImpl;
+import org.wikidata.wdtk.datamodel.implementation.SnakGroupImpl;
+import org.wikidata.wdtk.datamodel.implementation.StatementGroupImpl;
+import org.wikidata.wdtk.datamodel.implementation.StatementImpl;
+import org.wikidata.wdtk.datamodel.implementation.StringValueImpl;
+import org.wikidata.wdtk.datamodel.implementation.TimeValueImpl;
+import org.wikidata.wdtk.datamodel.implementation.ValueSnakImpl;
+import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.QuantityValue;
+import org.wikidata.wdtk.datamodel.interfaces.Snak;
+import org.wikidata.wdtk.datamodel.interfaces.SnakGroup;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+import org.wikidata.wdtk.datamodel.interfaces.StringValue;
+import org.wikidata.wdtk.datamodel.interfaces.TimeValue;
+import org.wikidata.wdtk.datamodel.interfaces.Value;
+import org.wikidata.wdtk.datamodel.interfaces.ValueSnak;
+import org.wikidata.wdtk.datamodel.interfaces.ValueVisitor;
 
 /**
  * Test for special aspects of {@link DatamodelConverter}. Regular operation is
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelFilterTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelFilterTest.java
index 5289b21a..fe39ac71 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelFilterTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelFilterTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,13 +18,36 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
 
-import static org.junit.Assert.assertEquals;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.DocumentDataFilter;
+import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.FormIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.LexemeDocument;
+import org.wikidata.wdtk.datamodel.interfaces.LexemeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MediaInfoDocument;
+import org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.SenseIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.SiteLink;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
 
 public class DatamodelFilterTest {
 
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelTest.java
index fb423ea4..2cd37d02 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatamodelTest.java
@@ -20,12 +20,12 @@
 
 package org.wikidata.wdtk.datamodel.helpers;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.math.BigDecimal;
 import java.util.Collections;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl;
 import org.wikidata.wdtk.datamodel.interfaces.Claim;
 import org.wikidata.wdtk.datamodel.interfaces.DataObjectFactory;
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatatypeConvertersTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatatypeConvertersTest.java
index 846e74d4..e54356a4 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatatypeConvertersTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/DatatypeConvertersTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,11 +18,13 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.math.BigDecimal;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.TimeValue;
 
 public class DatatypeConvertersTest {
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ItemDocumentBuilderTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ItemDocumentBuilderTest.java
index 05533dbb..1c1963bb 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ItemDocumentBuilderTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ItemDocumentBuilderTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,13 +18,16 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.Arrays;
 import java.util.Collections;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
@@ -42,7 +43,7 @@ public class ItemDocumentBuilderTest {
 	Statement s2;
 	Statement s1;
 	
-	@Before
+	@BeforeEach
 	public void setUp() {
 		i = ItemIdValue.NULL;
 		s1 = StatementBuilder.forSubjectAndProperty(i,
@@ -135,15 +136,16 @@ public class ItemDocumentBuilderTest {
 		assertEquals("pleutre", copy.findLabel("fr"));
 	}
 	
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidChangeOfSubjectId() {
-		ItemDocumentBuilder.forItemId(ItemIdValue.NULL).withRevisionId(1234).withEntityId(PropertyIdValue.NULL);
+		ItemDocumentBuilder builder = ItemDocumentBuilder.forItemId(ItemIdValue.NULL).withRevisionId(1234);
+		assertThrows(IllegalArgumentException.class, () -> builder.withEntityId(PropertyIdValue.NULL));
 	}
 
-	@Test(expected = IllegalStateException.class)
+	@Test
 	public void testDoubleBuild() {
 		ItemDocumentBuilder b = ItemDocumentBuilder.forItemId(ItemIdValue.NULL);
 		b.build();
-		b.build();
+		assertThrows(IllegalStateException.class, () -> b.build());
 	}
 }
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonDeserializerTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonDeserializerTest.java
index 75d97304..eea9e48d 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonDeserializerTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonDeserializerTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*-
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,14 +18,17 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
 import java.util.Collections;
 
 import org.apache.commons.io.IOUtils;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.EntityDocument;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
 import org.wikidata.wdtk.datamodel.interfaces.LexemeDocument;
@@ -49,31 +50,31 @@ public class JsonDeserializerTest {
 	@Test
 	public void testLoadItemDocument() throws IOException {
 		ItemDocument doc = SUT.deserializeItemDocument(loadJson("item.json"));
-		Assert.assertEquals(doc.getEntityId(), Datamodel.makeWikidataItemIdValue("Q34987"));
+		assertEquals(doc.getEntityId(), Datamodel.makeWikidataItemIdValue("Q34987"));
 	}
 	
 	@Test
 	public void testLoadPropertyDocument() throws IOException {
 		PropertyDocument doc = SUT.deserializePropertyDocument(loadJson("property.json"));
-		Assert.assertEquals(doc.getEntityId(), Datamodel.makeWikidataPropertyIdValue("P3467"));
+		assertEquals(doc.getEntityId(), Datamodel.makeWikidataPropertyIdValue("P3467"));
 	}
 	
 	@Test
 	public void testLoadLexemeDocument() throws IOException {
 		LexemeDocument doc = SUT.deserializeLexemeDocument(loadJson("lexeme.json"));
-		Assert.assertEquals(doc.getEntityId(), Datamodel.makeWikidataLexemeIdValue("L3872"));
-		Assert.assertEquals(doc.getForm(Datamodel.makeWikidataFormIdValue("L3872-F2")).getStatementGroups(), Collections.emptyList());
+		assertEquals(doc.getEntityId(), Datamodel.makeWikidataLexemeIdValue("L3872"));
+		assertEquals(doc.getForm(Datamodel.makeWikidataFormIdValue("L3872-F2")).getStatementGroups(), Collections.emptyList());
 	}
 	
 	@Test
 	public void testLoadMediaInfoDocument() throws IOException {
 		MediaInfoDocument doc = SUTcommons.deserializeMediaInfoDocument(loadJson("mediainfo.json"));
-		Assert.assertEquals(doc.getEntityId(), Datamodel.makeWikimediaCommonsMediaInfoIdValue("M74698470"));
+		assertEquals(doc.getEntityId(), Datamodel.makeWikimediaCommonsMediaInfoIdValue("M74698470"));
 	}
 	
 	@Test
 	public void testDeserializeEntityDocument() throws IOException {
 		EntityDocument doc = SUT.deserializeEntityDocument(loadJson("property.json"));
-		Assert.assertEquals(doc.getEntityId(), Datamodel.makeWikidataPropertyIdValue("P3467"));
+		assertEquals(doc.getEntityId(), Datamodel.makeWikidataPropertyIdValue("P3467"));
 	}
 }
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonSerializerTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonSerializerTest.java
index ae303cb6..3e64c35c 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonSerializerTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/JsonSerializerTest.java
@@ -20,8 +20,8 @@
 
 package org.wikidata.wdtk.datamodel.helpers;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -30,7 +30,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.implementation.EntityDocumentImpl;
 import org.wikidata.wdtk.datamodel.implementation.JsonComparator;
 import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/PropertyDocumentBuilderTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/PropertyDocumentBuilderTest.java
index 5951b662..b3121fac 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/PropertyDocumentBuilderTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/PropertyDocumentBuilderTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,11 +18,14 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.Collections;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
@@ -75,8 +76,9 @@ public class PropertyDocumentBuilderTest {
 		assertEquals(withAlias.getAliases().get("en"), Collections.singletonList(alias));
 	}
 	
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidSubjectId() {
-		PropertyDocumentBuilder.forPropertyIdAndDatatype(PropertyIdValue.NULL, DatatypeIdValue.DT_EXTERNAL_ID).withEntityId(ItemIdValue.NULL);
+		PropertyDocumentBuilder builder = PropertyDocumentBuilder.forPropertyIdAndDatatype(PropertyIdValue.NULL, DatatypeIdValue.DT_EXTERNAL_ID);
+		assertThrows(IllegalArgumentException.class, () -> builder.withEntityId(ItemIdValue.NULL));
 	}
 }
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ReferenceBuilderTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ReferenceBuilderTest.java
index a457245b..49908113 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ReferenceBuilderTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/ReferenceBuilderTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,12 +18,14 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.Arrays;
 import java.util.Collections;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.Reference;
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementBuilderTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementBuilderTest.java
index 25d4f330..839d8a34 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementBuilderTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementBuilderTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,12 +18,14 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.util.Arrays;
 import java.util.Collections;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.Reference;
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementDocumentTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementDocumentTest.java
index c373931d..fb5e02ae 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementDocumentTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/helpers/StatementDocumentTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.helpers;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,14 +18,19 @@ package org.wikidata.wdtk.datamodel.helpers;
  * #L%
  */
 
-import org.junit.Test;
+package org.wikidata.wdtk.datamodel.helpers;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.Statement;
 
-import static org.junit.Assert.*;
-
 public class StatementDocumentTest {
 	private static ItemIdValue Q1 = Datamodel.makeWikidataItemIdValue("Q1");
 	private static ItemIdValue Q2 = Datamodel.makeWikidataItemIdValue("Q2");
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ClaimImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ClaimImplTest.java
index b48311f8..50e42bae 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ClaimImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ClaimImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,14 +18,20 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.Claim;
 import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
@@ -52,19 +56,19 @@ public class ClaimImplTest {
 		assertEquals(c1.getQualifiers(), Collections.emptyList());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void subjectNotNull() {
-		new ClaimImpl(null, mainSnak, Collections.emptyList());
+		assertThrows(NullPointerException.class, () -> new ClaimImpl(null, mainSnak, Collections.emptyList()));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void mainSnakNotNull() {
-		new ClaimImpl(subject, null, Collections.emptyList());
+		assertThrows(NullPointerException.class, () -> new ClaimImpl(subject, null, Collections.emptyList()));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void qualifiersNotNull() {
-		new ClaimImpl(subject, mainSnak, null);
+		assertThrows(NullPointerException.class, () -> new ClaimImpl(subject, mainSnak, null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DataObjectFactoryImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DataObjectFactoryImplTest.java
index 0816fcf1..fa50175e 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DataObjectFactoryImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DataObjectFactoryImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,13 +18,40 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.math.BigDecimal;
 import java.util.Collections;
 
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.DataObjectFactory;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.FormIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.LexemeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.NoValueSnak;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.QuantityValue;
+import org.wikidata.wdtk.datamodel.interfaces.Reference;
+import org.wikidata.wdtk.datamodel.interfaces.SenseIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.SiteLink;
+import org.wikidata.wdtk.datamodel.interfaces.Snak;
+import org.wikidata.wdtk.datamodel.interfaces.SnakGroup;
+import org.wikidata.wdtk.datamodel.interfaces.SomeValueSnak;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+import org.wikidata.wdtk.datamodel.interfaces.StringValue;
+import org.wikidata.wdtk.datamodel.interfaces.TimeValue;
+import org.wikidata.wdtk.datamodel.interfaces.ValueSnak;
 
 public class DataObjectFactoryImplTest {
 
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DatatypeIdImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DatatypeIdImplTest.java
index 450ab9da..25393696 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DatatypeIdImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/DatatypeIdImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,9 +18,13 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
 
 public class DatatypeIdImplTest {
@@ -31,9 +33,9 @@ public class DatatypeIdImplTest {
 	private final DatatypeIdImpl d2 = new DatatypeIdImpl("http://wikiba.se/ontology#WikibaseItem");
 	private final DatatypeIdImpl d3 = new DatatypeIdImpl(DatatypeIdValue.DT_TIME);
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void datatypeIdNotNull() {
-		new DatatypeIdImpl((String) null);
+		assertThrows(NullPointerException.class, () -> new DatatypeIdImpl((String) null));
 	}
 
 	@Test
@@ -134,9 +136,9 @@ public class DatatypeIdImplTest {
 				DatatypeIdValue.DT_MONOLINGUAL_TEXT);
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testIriForInvalidType() {
-		DatatypeIdImpl.getDatatypeIriFromJsonDatatype("some wrong type");
+		assertThrows(IllegalArgumentException.class, () -> DatatypeIdImpl.getDatatypeIriFromJsonDatatype("some wrong type"))	;
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityIdValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityIdValueImplTest.java
index 01974685..159141e5 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityIdValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityIdValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,9 +18,12 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import org.junit.Test;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
 
 public class EntityIdValueImplTest {
 
@@ -56,9 +57,9 @@ public class EntityIdValueImplTest {
 		assertEquals(new MediaInfoIdValueImpl("M42", "http://foo/"), EntityIdValueImpl.fromId("M42", "http://foo/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testFromIdFailure() {
-		EntityIdValueImpl.fromId("L42-P1", "http://foo/");
+		assertThrows(IllegalArgumentException.class, () -> EntityIdValueImpl.fromId("L42-P1", "http://foo/"));
 	}
 
 }
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityRedirectDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityRedirectDocumentImplTest.java
index 9643e381..aaa710c7 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityRedirectDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/EntityRedirectDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,17 +18,21 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import java.io.IOException;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.interfaces.EntityRedirectDocument;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class EntityRedirectDocumentImplTest {
 
@@ -74,19 +76,19 @@ public class EntityRedirectDocumentImplTest {
 		assertEquals(itemRedirect.hashCode(), itemRedirect2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void idNotNull() {
-		new EntityRedirectDocumentImpl(null, targetItemId, 0);
+		assertThrows(NullPointerException.class, () -> new EntityRedirectDocumentImpl(null, targetItemId, 0));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void targetNotNull() {
-		new EntityRedirectDocumentImpl(entityItemId, null, 0);
+		assertThrows(NullPointerException.class, () -> new EntityRedirectDocumentImpl(entityItemId, null, 0));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void entityTypeEquality() {
-		new EntityRedirectDocumentImpl(entityItemId, new LexemeIdValueImpl("L1", "http://example.com/entity/"), 0);
+		assertThrows(IllegalArgumentException.class, () -> new EntityRedirectDocumentImpl(entityItemId, new LexemeIdValueImpl("L1", "http://example.com/entity/"), 0));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormDocumentImplTest.java
index 71c57fc0..e5a7d5e0 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,16 +18,36 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
 
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.FormDocument;
+import org.wikidata.wdtk.datamodel.interfaces.FormIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class FormDocumentImplTest {
 
@@ -94,19 +112,19 @@ public class FormDocumentImplTest {
 		assertEquals(fd1.hashCode(), fd2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void idNotNull() {
-		new FormDocumentImpl(null, repList, gramFeatures, statementGroups, 1234);
+		assertThrows(NullPointerException.class, () -> new FormDocumentImpl(null, repList, gramFeatures, statementGroups, 1234));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void representationsNotNull() {
-		new FormDocumentImpl(fid,  null, gramFeatures, statementGroups, 1234);
+		assertThrows(NullPointerException.class, () -> new FormDocumentImpl(fid,  null, gramFeatures, statementGroups, 1234));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void representationsNotEmpty() {
-		new FormDocumentImpl(fid, Collections.emptyList(), gramFeatures, statementGroups, 1234);
+		assertThrows(IllegalArgumentException.class, () -> new FormDocumentImpl(fid, Collections.emptyList(), gramFeatures, statementGroups, 1234));
 	}
 
 	@Test
@@ -121,9 +139,9 @@ public class FormDocumentImplTest {
 		assertTrue(doc.getStatementGroups().isEmpty());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementGroupsUseSameSubject() {
-		FormIdValue iid2 = new FormIdValueImpl("Q23", "http://example.org/");
+		FormIdValue iid2 = new FormIdValueImpl("L23-F5", "http://example.org/");
 		Statement s2 = new StatementImpl("MyId", StatementRank.NORMAL,
 				new SomeValueSnakImpl(new PropertyIdValueImpl("P42", "http://wikibase.org/entity/")),
 				Collections.emptyList(),  Collections.emptyList(), iid2);
@@ -133,7 +151,7 @@ public class FormDocumentImplTest {
 		statementGroups2.add(statementGroups.get(0));
 		statementGroups2.add(sg2);
 
-		new FormDocumentImpl(fid, repList, gramFeatures, statementGroups2, 1234);
+		assertThrows(IllegalArgumentException.class, () -> new FormDocumentImpl(fid, repList, gramFeatures, statementGroups2, 1234));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormIdValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormIdValueImplTest.java
index 84bb327f..b6409f97 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormIdValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/FormIdValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,16 +18,20 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class FormIdValueImplTest {
 
@@ -78,34 +80,34 @@ public class FormIdValueImplTest {
 		assertEquals(form1.hashCode(), form2.hashCode());
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idValidatedForFirstLetter() {
-		new FormIdValueImpl("Q12345", "http://www.wikidata.org/entity/");
+		assertThrows(RuntimeException.class, () -> new FormIdValueImpl("Q12345", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForNumber() {
-		new FormIdValueImpl("L34d23", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new FormIdValueImpl("L34d23", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForLength() {
-		new FormIdValueImpl("L", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new FormIdValueImpl("L", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForParts() {
-		new FormIdValueImpl("L21", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new FormIdValueImpl("L21", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idNotNull() {
-		new FormIdValueImpl((String)null, "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new FormIdValueImpl((String)null, "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void baseIriNotNull() {
-		new FormIdValueImpl("L42", null);
+		assertThrows(IllegalArgumentException.class, () -> new FormIdValueImpl("L42", null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/GlobeCoordinatesValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/GlobeCoordinatesValueImplTest.java
index 8b382391..d5a7ab11 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/GlobeCoordinatesValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/GlobeCoordinatesValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,15 +18,21 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 public class GlobeCoordinatesValueImplTest {
 
 	private final ObjectMapper mapper = new ObjectMapper();
@@ -59,9 +63,9 @@ public class GlobeCoordinatesValueImplTest {
 		assertEquals(new ItemIdValueImpl("Q2", "http://www.wikidata.org/entity/"), c1.getGlobeItemId());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void getGlobeItemIdInvalidIri() {
-		c3.getGlobeItemId();
+		assertThrows(IllegalArgumentException.class, () -> c3.getGlobeItemId());
 	}
 
 	@Test
@@ -94,10 +98,10 @@ public class GlobeCoordinatesValueImplTest {
 		assertEquals(c1.hashCode(), c2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void globeNotNull() {
-		new GlobeCoordinatesValueImpl(12.3, 14.1,
-				GlobeCoordinatesValue.PREC_DEGREE, null);
+		assertThrows(NullPointerException.class, () -> new GlobeCoordinatesValueImpl(12.3, 14.1,
+				GlobeCoordinatesValue.PREC_DEGREE, null));
 	}
 
 	@Test
@@ -107,32 +111,32 @@ public class GlobeCoordinatesValueImplTest {
 		assertTrue(v.getPrecision() > 0.);
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void latitudeWithinUpperRange() {
-		new GlobeCoordinatesValueImpl(91.0, 270.0,
+		assertThrows(IllegalArgumentException.class, () -> new GlobeCoordinatesValueImpl(91.0, 270.0,
 				GlobeCoordinatesValue.PREC_DEGREE,
-				GlobeCoordinatesValue.GLOBE_EARTH);
+				GlobeCoordinatesValue.GLOBE_EARTH));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void latitudeWithinLowerRange() {
-		new GlobeCoordinatesValueImpl(-91.0, 270.0,
+		assertThrows(IllegalArgumentException.class, () -> new GlobeCoordinatesValueImpl(-91.0, 270.0,
 				GlobeCoordinatesValue.PREC_DEGREE,
-				GlobeCoordinatesValue.GLOBE_EARTH);
+				GlobeCoordinatesValue.GLOBE_EARTH));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void longitudeWithinUpperRange() {
-		new GlobeCoordinatesValueImpl(45.0, 500.0,
+		assertThrows(IllegalArgumentException.class, () -> new GlobeCoordinatesValueImpl(45.0, 500.0,
 				GlobeCoordinatesValue.PREC_DEGREE,
-				GlobeCoordinatesValue.GLOBE_EARTH);
+				GlobeCoordinatesValue.GLOBE_EARTH));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void longitudeWithinLowerRange() {
-		new GlobeCoordinatesValueImpl(45.0, -500.0,
+		assertThrows(IllegalArgumentException.class, () -> new GlobeCoordinatesValueImpl(45.0, -500.0,
 				GlobeCoordinatesValue.PREC_DEGREE,
-				GlobeCoordinatesValue.GLOBE_EARTH);
+				GlobeCoordinatesValue.GLOBE_EARTH));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemDocumentImplTest.java
index 04316c70..1ab3a23c 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,12 +18,14 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -33,7 +33,22 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.SiteLink;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class ItemDocumentImplTest {
 
@@ -86,7 +101,7 @@ public class ItemDocumentImplTest {
 	@Test
 	public void findTerms() {
 		assertEquals("label", ir1.findLabel("en"));
-		assertNull( ir1.findLabel("ja"));
+		assertNull(ir1.findLabel("ja"));
 		assertEquals("des", ir1.findDescription("fr"));
 		assertNull( ir1.findDescription("ja"));
 	}
@@ -145,13 +160,13 @@ public class ItemDocumentImplTest {
 		assertEquals(ir1.hashCode(), ir2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void idNotNull() {
-		new ItemDocumentImpl(null,
+		assertThrows(NullPointerException.class, () -> new ItemDocumentImpl(null,
 				Collections.emptyList(),
 				Collections.emptyList(),
 				Collections.emptyList(),
-				statementGroups, sitelinks, 1234);
+				statementGroups, sitelinks, 1234));
 	}
 
 	@Test
@@ -191,7 +206,7 @@ public class ItemDocumentImplTest {
 		assertTrue(doc.getStatementGroups().isEmpty());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementGroupsUseSameSubject() {
 		ItemIdValue iid2 = new ItemIdValueImpl("Q23", "http://example.org/");
 		Statement s2 = new StatementImpl("MyId", StatementRank.NORMAL,
@@ -203,20 +218,20 @@ public class ItemDocumentImplTest {
 		statementGroups2.add(statementGroups.get(0));
 		statementGroups2.add(sg2);
 
-		new ItemDocumentImpl(iid,
+		assertThrows(IllegalArgumentException.class, () -> new ItemDocumentImpl(iid,
 				Collections.emptyList(),
 				Collections.emptyList(),
 				Collections.emptyList(),
-				statementGroups2, sitelinks, 1234);
+				statementGroups2, sitelinks, 1234));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void sitelinksNotNull() {
-		new ItemDocumentImpl(iid,
+		assertThrows(NullPointerException.class, () -> new ItemDocumentImpl(iid,
 				Collections.emptyList(),
 				Collections.emptyList(),
 				Collections.emptyList(),
-				statementGroups, null, 1234);
+				statementGroups, null, 1234));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemIdValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemIdValueImplTest.java
index 83c9a918..c562d434 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemIdValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ItemIdValueImplTest.java
@@ -1,18 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.Datamodel;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
-import org.wikidata.wdtk.datamodel.interfaces.UnsupportedEntityIdValue;
-import org.wikidata.wdtk.datamodel.interfaces.Value;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -32,6 +17,23 @@ import org.wikidata.wdtk.datamodel.interfaces.Value;
  * limitations under the License.
  * #L%
  */
+
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.IOException;
+
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.Datamodel;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.UnsupportedEntityIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.Value;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -87,29 +89,29 @@ public class ItemIdValueImplTest {
 		assertEquals(item1.hashCode(), item2.hashCode());
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idValidatedForFirstLetter() {
-		new ItemIdValueImpl("P12345", "http://www.wikidata.org/entity/");
+		assertThrows(RuntimeException.class, () -> new ItemIdValueImpl("P12345", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForNumber() {
-		new ItemIdValueImpl("Q34d23", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new ItemIdValueImpl("Q34d23", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForLength() {
-		new ItemIdValueImpl("Q", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new ItemIdValueImpl("Q", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idNotNull() {
-		new ItemIdValueImpl((String)null, "http://www.wikidata.org/entity/");
+		assertThrows(RuntimeException.class, () -> new ItemIdValueImpl((String)null, "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void baseIriNotNull() {
-		new ItemIdValueImpl("Q42", null);
+		assertThrows(NullPointerException.class, () -> new ItemIdValueImpl("Q42", null));
 	}
 
 	@Test
@@ -145,9 +147,9 @@ public class ItemIdValueImplTest {
 		assertEquals("foo", ((UnsupportedEntityIdValue)unsupported).getEntityTypeJsonString());
 	}
 	
-	@Test(expected = JsonMappingException.class)
+	@Test
 	public void testToJavaUnsupportedWithoutId() throws IOException {
-		mapper.readValue(JSON_ITEM_ID_VALUE_UNSUPPORTED_NO_ID, ValueImpl.class);
+		assertThrows(JsonMappingException.class, () -> mapper.readValue(JSON_ITEM_ID_VALUE_UNSUPPORTED_NO_ID, ValueImpl.class));
 	}
 
 }
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/JsonComparator.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/JsonComparator.java
index b596b271..d1074a68 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/JsonComparator.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/JsonComparator.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,9 +18,11 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import java.io.IOException;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.Assert;
+import java.io.IOException;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -45,7 +45,7 @@ public class JsonComparator {
 		try {
 			JsonNode tree1 = mapper.readTree(expected);
 			JsonNode tree2 = mapper.readTree(actual);
-			Assert.assertEquals(tree1, tree2);
+			assertEquals(tree1, tree2);
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeDocumentImplTest.java
index f1c21585..07e82f95 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,12 +18,13 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.Datamodel;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -33,7 +32,24 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.Datamodel;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.FormDocument;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.LexemeDocument;
+import org.wikidata.wdtk.datamodel.interfaces.LexemeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.SenseDocument;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class LexemeDocumentImplTest {
 
@@ -86,9 +102,9 @@ public class LexemeDocumentImplTest {
 		assertEquals(form, ld1.getForm(form.getEntityId()));
 	}
 
-	@Test(expected=IndexOutOfBoundsException.class)
+	@Test
 	public void formGetterNotFound() {
-		ld1.getForm(new FormIdValueImpl("L42-F2", "http://example.com/entity/"));
+		assertThrows(IndexOutOfBoundsException.class, () -> ld1.getForm(new FormIdValueImpl("L42-F2", "http://example.com/entity/")));
 	}
 
 	@Test
@@ -96,9 +112,9 @@ public class LexemeDocumentImplTest {
 		assertEquals(sense, ld1.getSense(sense.getEntityId()));
 	}
 
-	@Test(expected=IndexOutOfBoundsException.class)
+	@Test
 	public void senseGetterNotFound() {
-		ld1.getSense(new SenseIdValueImpl("L42-S2", "http://example.com/entity/"));
+		assertThrows(IndexOutOfBoundsException.class, () -> ld1.getSense(new SenseIdValueImpl("L42-S2", "http://example.com/entity/")));
 	}
 
 	@Test
@@ -139,29 +155,29 @@ public class LexemeDocumentImplTest {
 		assertEquals(ld1.hashCode(), ld2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void idNotNull() {
-		new LexemeDocumentImpl(null, lexCat, language, lemmaList, statementGroups, forms, senses,  1234);
+		assertThrows(NullPointerException.class, () -> new LexemeDocumentImpl(null, lexCat, language, lemmaList, statementGroups, forms, senses,  1234));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void lexicalCategoryNotNull() {
-		new LexemeDocumentImpl(lid, null, language, lemmaList, statementGroups, forms, senses, 1234);
+		assertThrows(NullPointerException.class, () -> new LexemeDocumentImpl(lid, null, language, lemmaList, statementGroups, forms, senses, 1234));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void languageNotNull() {
-		new LexemeDocumentImpl(lid, lexCat, null, lemmaList, statementGroups, forms, senses,  1234);
+		assertThrows(NullPointerException.class, () -> new LexemeDocumentImpl(lid, lexCat, null, lemmaList, statementGroups, forms, senses,  1234));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void lemmasNotNull() {
-		new LexemeDocumentImpl(lid, lexCat, language, null, statementGroups, forms, senses,  1234);
+		assertThrows(NullPointerException.class, () -> new LexemeDocumentImpl(lid, lexCat, language, null, statementGroups, forms, senses,  1234));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void lemmasNotEmpty() {
-		new LexemeDocumentImpl(lid, lexCat, language, Collections.emptyList(), statementGroups, forms, senses,  1234);
+		assertThrows(IllegalArgumentException.class, () -> new LexemeDocumentImpl(lid, lexCat, language, Collections.emptyList(), statementGroups, forms, senses,  1234));
 	}
 
 	@Test
@@ -170,9 +186,9 @@ public class LexemeDocumentImplTest {
 		assertTrue(doc.getStatementGroups().isEmpty());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementGroupsUseSameSubject() {
-		LexemeIdValue iid2 = new LexemeIdValueImpl("Q23", "http://example.org/");
+		LexemeIdValue iid2 = new LexemeIdValueImpl("L23", "http://example.org/");
 		Statement s2 = new StatementImpl("MyId", StatementRank.NORMAL,
 				new SomeValueSnakImpl(new PropertyIdValueImpl("P42", "http://wikibase.org/entity/")),
 				Collections.emptyList(),  Collections.emptyList(), iid2);
@@ -182,7 +198,7 @@ public class LexemeDocumentImplTest {
 		statementGroups2.add(statementGroups.get(0));
 		statementGroups2.add(sg2);
 
-		new LexemeDocumentImpl(lid, lexCat, language, lemmaList, statementGroups2, forms, senses,  1234);
+		assertThrows(IllegalArgumentException.class, () -> new LexemeDocumentImpl(lid, lexCat, language, lemmaList, statementGroups2, forms, senses,  1234));
 	}
 
 	@Test
@@ -262,14 +278,14 @@ public class LexemeDocumentImplTest {
 		assertEquals(ld1.getForms().size() + 1, ld1.withForm(newForm).getForms().size());
 		assertEquals(newForm, ld1.withForm(newForm).getForm(newForm.getEntityId()));
 	}
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testWithWrongFormId() {
-		ld1.withForm(Datamodel.makeFormDocument(
+		assertThrows(IllegalArgumentException.class, () -> ld1.withForm(Datamodel.makeFormDocument(
 				Datamodel.makeFormIdValue("L444-F32","http://example.com/entity/"),
 				Collections.singletonList(new TermImpl("en", "add1")),
 				Collections.emptyList(),
 				Collections.emptyList()
-		));
+		)));
 	}
 
 	@Test
@@ -280,13 +296,13 @@ public class LexemeDocumentImplTest {
 		assertEquals(newSense, ld1.withSense(newSense).getSense(newSense.getEntityId()));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testWithWrongSenseId() {
-		ld1.withSense(Datamodel.makeSenseDocument(
+		assertThrows(IllegalArgumentException.class, () -> ld1.withSense(Datamodel.makeSenseDocument(
 				Datamodel.makeSenseIdValue("L444-S32","http://example.com/entity/"),
 				Collections.singletonList(new TermImpl("en", "add1")),
 				Collections.emptyList()
-		));
+		)));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeIdValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeIdValueImplTest.java
index ec1f36a8..29292afa 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeIdValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/LexemeIdValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,17 +18,21 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import java.io.IOException;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
 
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class LexemeIdValueImplTest {
 
@@ -79,29 +81,29 @@ public class LexemeIdValueImplTest {
 		assertEquals(lexeme1.hashCode(), lexeme2.hashCode());
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idValidatedForFirstLetter() {
-		new LexemeIdValueImpl("Q12345", "http://www.wikidata.org/entity/");
+		assertThrows(RuntimeException.class, () -> new LexemeIdValueImpl("Q12345", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForNumber() {
-		new LexemeIdValueImpl("L34d23", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new LexemeIdValueImpl("L34d23", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForLength() {
-		new LexemeIdValueImpl("L", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new LexemeIdValueImpl("L", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idNotNull() {
-		new LexemeIdValueImpl((String)null, "http://www.wikidata.org/entity/");
+		assertThrows(RuntimeException.class, () -> new LexemeIdValueImpl((String)null, "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void baseIriNotNull() {
-		new LexemeIdValueImpl("L42", null);
+		assertThrows(NullPointerException.class, () -> new LexemeIdValueImpl("L42", null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoDocumentImplTest.java
index d5d3ae8d..a2c41f51 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,12 +18,14 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -33,7 +33,21 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MediaInfoDocument;
+import org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class MediaInfoDocumentImplTest {
 
@@ -68,7 +82,7 @@ public class MediaInfoDocumentImplTest {
 	@Test
 	public void findLabels() {
 		assertEquals("label", mi1.findLabel("en"));
-		assertNull( mi1.findLabel("ja"));
+		assertNull(mi1.findLabel("ja"));
 	}
 
 	@Test
@@ -110,9 +124,9 @@ public class MediaInfoDocumentImplTest {
 		assertEquals(mi1.hashCode(), mi2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void idNotNull() {
-		new MediaInfoDocumentImpl(null, Collections.emptyList(), statementGroups, 1234);
+		assertThrows(NullPointerException.class, () -> new MediaInfoDocumentImpl(null, Collections.emptyList(), statementGroups, 1234));
 	}
 
 	@Test
@@ -127,9 +141,9 @@ public class MediaInfoDocumentImplTest {
 		assertTrue(doc.getStatementGroups().isEmpty());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementGroupsUseSameSubject() {
-		MediaInfoIdValue mid2 = new MediaInfoIdValueImpl("Q23", "http://example.org/");
+		MediaInfoIdValue mid2 = new MediaInfoIdValueImpl("M23", "http://example.org/");
 		Statement s2 = new StatementImpl("MyId", StatementRank.NORMAL,
 				new SomeValueSnakImpl(new PropertyIdValueImpl("P42", "http://wikibase.org/entity/")),
 				Collections.emptyList(),  Collections.emptyList(), mid2);
@@ -139,7 +153,7 @@ public class MediaInfoDocumentImplTest {
 		statementGroups2.add(statementGroups.get(0));
 		statementGroups2.add(sg2);
 
-		new MediaInfoDocumentImpl(mid, Collections.emptyList(), statementGroups2, 1234);
+		assertThrows(IllegalArgumentException.class, () -> new MediaInfoDocumentImpl(mid, Collections.emptyList(), statementGroups2, 1234));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoIdValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoIdValueImplTest.java
index bf318679..e0aacd2c 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoIdValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MediaInfoIdValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,17 +18,21 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import java.io.IOException;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
 
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class MediaInfoIdValueImplTest {
 
@@ -79,29 +81,29 @@ public class MediaInfoIdValueImplTest {
 		assertEquals(mediaInfo1.hashCode(), mediaInfo2.hashCode());
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idValidatedForFirstLetter() {
-		new MediaInfoIdValueImpl("Q12345", "http://commons.wikimedia.org/entity/");
+		assertThrows(RuntimeException.class, () -> new MediaInfoIdValueImpl("Q12345", "http://commons.wikimedia.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForNumber() {
-		new MediaInfoIdValueImpl("L34d23", "http://commons.wikimedia.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new MediaInfoIdValueImpl("L34d23", "http://commons.wikimedia.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForLength() {
-		new MediaInfoIdValueImpl("M", "http://commons.wikimedia.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new MediaInfoIdValueImpl("M", "http://commons.wikimedia.org/entity/"));
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idNotNull() {
-		new MediaInfoIdValueImpl((String)null, "http://commons.wikimedia.org/entity/");
+		assertThrows(RuntimeException.class, () -> new MediaInfoIdValueImpl((String)null, "http://commons.wikimedia.org/entity/"));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void baseIriNotNull() {
-		new MediaInfoIdValueImpl("M42", null);
+		assertThrows(NullPointerException.class, () -> new MediaInfoIdValueImpl("M42", null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MonolingualTextValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MonolingualTextValueImplTest.java
index 566c3b71..cd9ebb72 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MonolingualTextValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/MonolingualTextValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,15 +18,20 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 public class MonolingualTextValueImplTest {
 
 	private final ObjectMapper mapper = new ObjectMapper();
@@ -63,14 +66,14 @@ public class MonolingualTextValueImplTest {
 		assertEquals(mt1.hashCode(), mt2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void textNotNull() {
-		new MonolingualTextValueImpl(null, "en");
+		assertThrows(NullPointerException.class, () -> new MonolingualTextValueImpl(null, "en"));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void languageCodeNotNull() {
-		new MonolingualTextValueImpl("some text", null);
+		assertThrows(NullPointerException.class, () -> new MonolingualTextValueImpl("some text", null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyDocumentImplTest.java
index b9b672f4..e0a84994 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,20 +18,35 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 
 public class PropertyDocumentImplTest {
@@ -86,9 +99,9 @@ public class PropertyDocumentImplTest {
 	@Test
 	public void findTerms() {
 		assertEquals("label", pd1.findLabel("en"));
-		assertNull( pd1.findLabel("ja"));
+		assertNull(pd1.findLabel("ja"));
 		assertEquals("des", pd1.findDescription("fr"));
-		assertNull( pd1.findDescription("ja"));
+		assertNull(pd1.findDescription("ja"));
 	}
 
 	@Test
@@ -133,10 +146,10 @@ public class PropertyDocumentImplTest {
 		assertEquals(pd1.hashCode(), pd2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void idNotNull() {
-		new PropertyDocumentImpl(null, labelList, descList, aliasList,
-				statementGroups, datatypeId, 1234);
+		assertThrows(NullPointerException.class, () -> new PropertyDocumentImpl(null, labelList, descList, aliasList,
+				statementGroups, datatypeId, 1234));
 	}
 
 	@Test
@@ -167,28 +180,28 @@ public class PropertyDocumentImplTest {
 		assertEquals(Collections.emptyList(), doc.getStatementGroups());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void datatypeNotNull() {
-		new PropertyDocumentImpl(pid, labelList, descList, aliasList,
-				statementGroups, null, 1234);
+		assertThrows(NullPointerException.class, () -> new PropertyDocumentImpl(pid, labelList, descList, aliasList,
+				statementGroups, null, 1234));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void labelUniquePerLanguage() {
 		List<MonolingualTextValue> labels2 = new ArrayList<>(labelList);
 		labels2.add(new MonolingualTextValueImpl("Property 42 label duplicate", "en"));
 
-		new PropertyDocumentImpl(pid, labels2, descList, aliasList,
-				statementGroups, datatypeId, 1234);
+		assertThrows(IllegalArgumentException.class, () -> new PropertyDocumentImpl(pid, labels2, descList, aliasList,
+				statementGroups, datatypeId, 1234));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void descriptionUniquePerLanguage() {
 		List<MonolingualTextValue> descriptions2 = new ArrayList<>(descList);
 		descriptions2.add(new MonolingualTextValueImpl("Duplicate desc P42", "fr"));
 
-		new PropertyDocumentImpl(pid, labelList, descriptions2, aliasList,
-				statementGroups, datatypeId, 1234);
+		assertThrows(IllegalArgumentException.class, () -> new PropertyDocumentImpl(pid, labelList, descriptions2, aliasList,
+				statementGroups, datatypeId, 1234));
 	}
 	
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyIdValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyIdValueImplTest.java
index fff572d6..84e282da 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyIdValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/PropertyIdValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,16 +18,21 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import java.io.IOException;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
 
-import java.io.IOException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class PropertyIdValueImplTest {
 
@@ -73,19 +76,19 @@ public class PropertyIdValueImplTest {
 		assertEquals(prop1.hashCode(), prop2.hashCode());
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idValidatedForFirstLetter() {
-		new PropertyIdValueImpl("Q12345", "http://www.wikidata.org/entity/");
+		assertThrows(RuntimeException.class, () -> new PropertyIdValueImpl("Q12345", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForLength() {
-		new ItemIdValueImpl("P", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new ItemIdValueImpl("P", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForNumber() {
-		new PropertyIdValueImpl("P34d23", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new PropertyIdValueImpl("P34d23", "http://www.wikidata.org/entity/"));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/QuantityValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/QuantityValueImplTest.java
index f45e1508..73ce7b1b 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/QuantityValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/QuantityValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,15 +18,21 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.QuantityValue;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 import java.math.BigDecimal;
 
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.QuantityValue;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class QuantityValueImplTest {
 
@@ -66,9 +70,9 @@ public class QuantityValueImplTest {
 		assertNull(q4.getUnitItemId());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void getUnitItemIdInvalidIri() {
-		q5.getUnitItemId();
+		assertThrows(IllegalArgumentException.class, () -> q5.getUnitItemId());
 	}
 
 	@Test
@@ -115,39 +119,39 @@ public class QuantityValueImplTest {
 		assertEquals(q1.hashCode(), q2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void numValueNotNull() {
-		new QuantityValueImpl(null, lb, ub, unitMeter);
+		assertThrows(NullPointerException.class, () -> new QuantityValueImpl(null, lb, ub, unitMeter));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void lowerBoundNotNull() {
-		new QuantityValueImpl(nv, null, ub, unitMeter);
+		assertThrows(NullPointerException.class, () -> new QuantityValueImpl(nv, null, ub, unitMeter));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void upperBoundNotNull() {
-		new QuantityValueImpl(nv, lb, null, unitMeter);
+		assertThrows(NullPointerException.class, () -> new QuantityValueImpl(nv, lb, null, unitMeter));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void unitNotNull() {
-		new QuantityValueImpl(nv, lb, ub, null);
+		assertThrows(NullPointerException.class, () -> new QuantityValueImpl(nv, lb, ub, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void unitNotEmpty() {
-		new QuantityValueImpl(nv, lb, ub, "");
+		assertThrows(IllegalArgumentException.class, () -> new QuantityValueImpl(nv, lb, ub, ""));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void lowerBoundNotGreaterNumVal() {
-		new QuantityValueImpl(lb, nv, ub, unitMeter);
+		assertThrows(IllegalArgumentException.class, () -> new QuantityValueImpl(lb, nv, ub, unitMeter));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void numValNotGreaterLowerBound() {
-		new QuantityValueImpl(ub, lb, nv, unitMeter);
+		assertThrows(IllegalArgumentException.class, () -> new QuantityValueImpl(ub, lb, nv, unitMeter));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ReferenceImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ReferenceImplTest.java
index bd4c795f..5597b906 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ReferenceImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/ReferenceImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,12 +18,18 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.Collections;
 import java.util.Iterator;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.Reference;
@@ -67,9 +71,9 @@ public class ReferenceImplTest {
 		assertEquals(r1.hashCode(), r2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void snakListNotNull() {
-		new ReferenceImpl(null);
+		assertThrows(NullPointerException.class, () -> new ReferenceImpl(null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseDocumentImplTest.java
index b92a96d2..0df962a6 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,16 +18,34 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
 
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.SenseDocument;
+import org.wikidata.wdtk.datamodel.interfaces.SenseIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementGroup;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class SenseDocumentImplTest {
 
@@ -87,19 +103,19 @@ public class SenseDocumentImplTest {
 		assertEquals(sd1.hashCode(), sd2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void idNotNull() {
-		new SenseDocumentImpl(null, repList, statementGroups, 1234);
+		assertThrows(NullPointerException.class, () -> new SenseDocumentImpl(null, repList, statementGroups, 1234));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void glossesNotNull() {
-		new SenseDocumentImpl(sid,  null, statementGroups, 1234);
+		assertThrows(NullPointerException.class, () -> new SenseDocumentImpl(sid,  null, statementGroups, 1234));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void glossesNotEmpty() {
-		new SenseDocumentImpl(sid, Collections.emptyList(), statementGroups, 1234);
+		assertThrows(IllegalArgumentException.class, () -> new SenseDocumentImpl(sid, Collections.emptyList(), statementGroups, 1234));
 	}
 
 	@Test
@@ -108,9 +124,9 @@ public class SenseDocumentImplTest {
 		assertTrue(doc.getStatementGroups().isEmpty());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementGroupsUseSameSubject() {
-		SenseIdValue iid2 = new SenseIdValueImpl("Q23", "http://example.org/");
+		SenseIdValue iid2 = new SenseIdValueImpl("L23-S5", "http://example.org/");
 		Statement s2 = new StatementImpl("MyId", StatementRank.NORMAL,
 				new SomeValueSnakImpl(new PropertyIdValueImpl("P42", "http://wikibase.org/entity/")),
 				Collections.emptyList(),  Collections.emptyList(), iid2);
@@ -120,7 +136,7 @@ public class SenseDocumentImplTest {
 		statementGroups2.add(statementGroups.get(0));
 		statementGroups2.add(sg2);
 
-		new SenseDocumentImpl(sid, repList, statementGroups2, 1234);
+		assertThrows(IllegalArgumentException.class, () -> new SenseDocumentImpl(sid, repList, statementGroups2, 1234));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseIdValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseIdValueImplTest.java
index 720ec98e..7cd22cda 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseIdValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SenseIdValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,16 +18,20 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class SenseIdValueImplTest {
 
@@ -78,34 +80,34 @@ public class SenseIdValueImplTest {
 		assertEquals(sense1.hashCode(), sense2.hashCode());
 	}
 
-	@Test(expected = RuntimeException.class)
+	@Test
 	public void idValidatedForFirstLetter() {
-		new SenseIdValueImpl("Q12345", "http://www.wikidata.org/entity/");
+		assertThrows(RuntimeException.class, () -> new SenseIdValueImpl("Q12345", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForNumber() {
-		new SenseIdValueImpl("L34d23", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new SenseIdValueImpl("L34d23", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForLength() {
-		new SenseIdValueImpl("L", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new SenseIdValueImpl("L", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idValidatedForParts() {
-		new SenseIdValueImpl("L21", "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new SenseIdValueImpl("L21", "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void idNotNull() {
-		new SenseIdValueImpl((String)null, "http://www.wikidata.org/entity/");
+		assertThrows(IllegalArgumentException.class, () -> new SenseIdValueImpl((String)null, "http://www.wikidata.org/entity/"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void baseIriNotNull() {
-		new SenseIdValueImpl("L42", null);
+		assertThrows(IllegalArgumentException.class, () -> new SenseIdValueImpl("L42", null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SiteLinkImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SiteLinkImplTest.java
index 32b16ab0..08d9f834 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SiteLinkImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SiteLinkImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,20 +18,25 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.SiteLink;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 public class SiteLinkImplTest {
 
 	private final ObjectMapper mapper = new DatamodelMapper("http://example.com/entity/");
@@ -74,14 +77,14 @@ public class SiteLinkImplTest {
 		assertEquals(s1.hashCode(), s2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void titleNotNull() {
-		new SiteLinkImpl(null, "enwiki", Collections.emptyList());
+		assertThrows(NullPointerException.class, () -> new SiteLinkImpl(null, "enwiki", Collections.emptyList()));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void siteKeyNotNull() {
-		new SiteLinkImpl("Dresden", null, Collections.emptyList());
+		assertThrows(NullPointerException.class, () -> new SiteLinkImpl("Dresden", null, Collections.emptyList()));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SitesImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SitesImplTest.java
index fb0ae976..6fa93546 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SitesImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SitesImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,20 +18,22 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.util.Collections;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.SiteLink;
 
 public class SitesImplTest {
 
 	private SitesImpl sites;
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		this.sites = new SitesImpl();
 		this.sites.setSiteInformation("enwiki", "wikipedia", "en", "mediawiki",
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakGroupTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakGroupTest.java
index b5fb0d33..879b39d5 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakGroupTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakGroupTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,15 +18,25 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.junit.Before;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.Snak;
+import org.wikidata.wdtk.datamodel.interfaces.SnakGroup;
 
 public class SnakGroupTest {
 
@@ -38,7 +46,7 @@ public class SnakGroupTest {
 	private Snak snak2;
 	private PropertyIdValue property;
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		EntityIdValue subject = new ItemIdValueImpl("Q42",
 				"http://wikidata.org/entity/");
@@ -92,17 +100,17 @@ public class SnakGroupTest {
 		assertEquals(sg1.hashCode(), sg2.hashCode());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void snakListNotNull() {
-		new SnakGroupImpl(null);
+		assertThrows(IllegalArgumentException.class, () -> new SnakGroupImpl(null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void snakListNotEmpty() {
-		new SnakGroupImpl(Collections.emptyList());
+		assertThrows(IllegalArgumentException.class, () -> new SnakGroupImpl(Collections.emptyList()));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void snakListRequiresSameProperty() {
 		List<Snak> snaks = new ArrayList<>();
 
@@ -112,7 +120,7 @@ public class SnakGroupTest {
 		Snak snak3 = new NoValueSnakImpl(property2);
 		snaks.add(snak3);
 
-		new SnakGroupImpl(snaks);
+		assertThrows(IllegalArgumentException.class, () -> new SnakGroupImpl(snaks));
 	}
 
 }
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakImplTest.java
index 432618cb..43b9c794 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/SnakImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,18 +18,23 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import java.io.IOException;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.interfaces.NoValueSnak;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.SomeValueSnak;
 import org.wikidata.wdtk.datamodel.interfaces.ValueSnak;
 
-import java.io.IOException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class SnakImplTest {
 
@@ -105,15 +108,15 @@ public class SnakImplTest {
 		assertNotEquals(nvs1, null);
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void snakPropertyNotNull() {
-		new SomeValueSnakImpl(null);
+		assertThrows(NullPointerException.class, () -> new SomeValueSnakImpl(null));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void snakValueNotNull() {
-		new ValueSnakImpl(new PropertyIdValueImpl("P42",
-				"http://example.com/entity/"), null);
+		assertThrows(NullPointerException.class, () -> new ValueSnakImpl(new PropertyIdValueImpl("P42",
+				"http://example.com/entity/"), null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementDocumentAccessTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementDocumentAccessTest.java
index f516fc18..ba8a0dd1 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementDocumentAccessTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementDocumentAccessTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,14 +18,28 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import org.junit.Test;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import org.junit.jupiter.api.Test;
 import org.mockito.internal.util.collections.Sets;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.ItemDocumentBuilder;
 import org.wikidata.wdtk.datamodel.helpers.StatementBuilder;
-import org.wikidata.wdtk.datamodel.interfaces.*;
-
-import static org.junit.Assert.*;
+import org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.QuantityValue;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementDocument;
+import org.wikidata.wdtk.datamodel.interfaces.StringValue;
+import org.wikidata.wdtk.datamodel.interfaces.TimeValue;
 
 /**
  * Test general statement access methods as implemented in
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementGroupTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementGroupTest.java
index c2b09a73..aed4b334 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementGroupTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementGroupTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,11 +18,22 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import java.util.*;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import org.junit.Test;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.Snak;
@@ -85,7 +94,6 @@ public class StatementGroupTest {
 	public void getBestStatementsEmpty() {
 		assertNull(
 				new StatementGroupImpl(Collections.singletonList(statementDeprecrated)).getBestStatements()
-
 		);
 	}
 
@@ -118,17 +126,17 @@ public class StatementGroupTest {
 		assertEquals(sg1.hashCode(), sg2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void statementListNotNull() {
-		new StatementGroupImpl(null);
+		assertThrows(NullPointerException.class, () -> new StatementGroupImpl(null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementListNotEmpty() {
-		new StatementGroupImpl(Collections.emptyList());
+		assertThrows(IllegalArgumentException.class, () -> new StatementGroupImpl(Collections.emptyList()));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementListRequiresSameSubject() {
 		List<Statement> statements = new ArrayList<>();
 
@@ -141,10 +149,10 @@ public class StatementGroupTest {
 				Collections.emptyList(),  Collections.emptyList(), subject2);
 		statements.add(s2);
 
-		new StatementGroupImpl(statements);
+		assertThrows(IllegalArgumentException.class, () -> new StatementGroupImpl(statements));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void statementListRequiresSameProperty() {
 		List<Statement> statements = new ArrayList<>();
 
@@ -156,7 +164,7 @@ public class StatementGroupTest {
 			Collections.emptyList(), Collections.emptyList(), subject);
 		statements.add(s2);
 
-		new StatementGroupImpl(statements);
+		assertThrows(IllegalArgumentException.class, () -> new StatementGroupImpl(statements));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementImplTest.java
index 0c86fc7b..d85378d3 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StatementImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,17 +18,30 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
+import org.wikidata.wdtk.datamodel.interfaces.Claim;
+import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.Reference;
+import org.wikidata.wdtk.datamodel.interfaces.SnakGroup;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
+import org.wikidata.wdtk.datamodel.interfaces.ValueSnak;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
-import org.wikidata.wdtk.datamodel.interfaces.*;
 
 public class StatementImplTest {
 
@@ -66,10 +77,10 @@ public class StatementImplTest {
 		assertEquals(s1.getSubject(), subjet);
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void mainSnakNotNull() {
-		new StatementImpl("MyId", StatementRank.NORMAL, null,
-				Collections.emptyList(), Collections.emptyList(), value);
+		assertThrows(NullPointerException.class, () -> new StatementImpl("MyId", StatementRank.NORMAL, null,
+				Collections.emptyList(), Collections.emptyList(), value));
 	}
 
 	@Test
@@ -78,10 +89,10 @@ public class StatementImplTest {
 		assertTrue(statement.getReferences().isEmpty());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void rankNotNull() {
-		new StatementImpl("MyId", null, mainSnak,
-				Collections.emptyList(), Collections.emptyList(), value);
+		assertThrows(NullPointerException.class, () -> new StatementImpl("MyId", null, mainSnak,
+				Collections.emptyList(), Collections.emptyList(), value));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StringValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StringValueImplTest.java
index 8b43fc0b..743466c1 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StringValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/StringValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,15 +18,20 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.StringValue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.StringValue;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 public class StringValueImplTest {
 
 	private final ObjectMapper mapper = new ObjectMapper();
@@ -58,9 +61,9 @@ public class StringValueImplTest {
 		assertEquals(s1.hashCode(), s2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void stringNotNull() {
-		new StringValueImpl(null);
+		assertThrows(NullPointerException.class, () -> new StringValueImpl(null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermImplTest.java
index d96eb77e..b7b1ce82 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,15 +18,19 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class TermImplTest {
 
@@ -64,14 +66,14 @@ public class TermImplTest {
 		assertEquals(mt1.hashCode(), mt2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void textNotNull() {
-		new TermImpl("en", null);
+		assertThrows(NullPointerException.class, () -> new TermImpl("en", null));
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void languageCodeNotNull() {
-		new TermImpl(null, "some text");
+		assertThrows(NullPointerException.class, () -> new TermImpl(null, "some text"));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermedStatementDocumentImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermedStatementDocumentImplTest.java
index 3f885904..5091c2f3 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermedStatementDocumentImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TermedStatementDocumentImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,13 +18,27 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import org.junit.Before;
-import org.junit.Test;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.Snak;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
+import org.wikidata.wdtk.datamodel.interfaces.StatementRank;
 
 public class TermedStatementDocumentImplTest {
 	
@@ -36,7 +48,7 @@ public class TermedStatementDocumentImplTest {
 	private String statementIdA = "myIdA";
 	private String statementIdB = "myIdB";
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		ItemIdValue subject = new ItemIdValueImpl("Q42",
 				"http://wikidata.org/entity/");
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TimeValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TimeValueImplTest.java
index 163a9eb0..653defe3 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TimeValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/TimeValueImplTest.java
@@ -20,12 +20,13 @@
 
 package org.wikidata.wdtk.datamodel.implementation;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.TimeValue;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -65,9 +66,9 @@ public class TimeValueImplTest {
 		assertEquals(new ItemIdValueImpl("Q1985727", "http://www.wikidata.org/entity/"), t1.getPreferredCalendarModelItemId());
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void getPreferredCalendarModelItemIdInvalidIri() {
-		t3.getPreferredCalendarModelItemId();
+		assertThrows(IllegalArgumentException.class, () -> t3.getPreferredCalendarModelItemId());
 	}
 
 	@Test
@@ -128,10 +129,10 @@ public class TimeValueImplTest {
 		assertEquals(t1.hashCode(), t2.hashCode());
 	}
 
-	@Test(expected = NullPointerException.class)
+	@Test
 	public void calendarModelNotNull() {
-		new TimeValueImpl(2007, (byte) 5, (byte) 12, (byte) 10, (byte) 45,
-				(byte) 0, TimeValue.PREC_SECOND, 0, 1, 60, null);
+		assertThrows(NullPointerException.class, () -> new TimeValueImpl(2007, (byte) 5, (byte) 12, (byte) 10, (byte) 45,
+				(byte) 0, TimeValue.PREC_SECOND, 0, 1, 60, null));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedEntityIdValueTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedEntityIdValueTest.java
index a37f43d4..dae42d2b 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedEntityIdValueTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedEntityIdValueTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*-
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,14 +18,16 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNull;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 import java.io.IOException;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.helpers.ToString;
 import org.wikidata.wdtk.datamodel.interfaces.EntityIdValue;
@@ -46,7 +46,7 @@ public class UnsupportedEntityIdValueTest {
 	
 	private UnsupportedEntityIdValue firstValue, secondValue, noType;
 	
-	@Before
+	@BeforeEach
 	public void deserializeValues() throws IOException {
 		firstValue = mapper.readValue(JSON_UNSUPPORTED_VALUE_1, UnsupportedEntityIdValueImpl.class);
 		secondValue = mapper.readValue(JSON_UNSUPPORTED_VALUE_2, UnsupportedEntityIdValueImpl.class);
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedValueImplTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedValueImplTest.java
index 62990038..e1fc3fee 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedValueImplTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/UnsupportedValueImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*-
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,15 +18,18 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import org.wikidata.wdtk.datamodel.helpers.ToString;
-import org.wikidata.wdtk.datamodel.interfaces.UnsupportedValue;
-import org.wikidata.wdtk.datamodel.interfaces.Value;
+package org.wikidata.wdtk.datamodel.implementation;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 
-import static org.junit.Assert.*;
 import java.io.IOException;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.datamodel.helpers.ToString;
+import org.wikidata.wdtk.datamodel.interfaces.UnsupportedValue;
+import org.wikidata.wdtk.datamodel.interfaces.Value;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -41,7 +42,7 @@ public class UnsupportedValueImplTest {
 	
 	private UnsupportedValue firstValue, secondValue;
 	
-	@Before
+	@BeforeEach
 	public void deserializeFirstValue() throws IOException {
 		firstValue = mapper.readValue(JSON_UNSUPPORTED_VALUE_1, UnsupportedValueImpl.class);
 		secondValue = mapper.readValue(JSON_UNSUPPORTED_VALUE_2, UnsupportedValueImpl.class);
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/WikimediaLanguageCodesTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/WikimediaLanguageCodesTest.java
index ce2f1347..17548997 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/WikimediaLanguageCodesTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/implementation/WikimediaLanguageCodesTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.implementation;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,9 +18,12 @@ package org.wikidata.wdtk.datamodel.implementation;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.implementation;
 
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.WikimediaLanguageCodes;
 
 public class WikimediaLanguageCodesTest {
@@ -33,9 +34,9 @@ public class WikimediaLanguageCodesTest {
 		assertEquals("en", WikimediaLanguageCodes.getLanguageCode("en"));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void getUnknownLanguageCode() {
-		WikimediaLanguageCodes.getLanguageCode("unknown");
+		assertThrows(IllegalArgumentException.class, () -> WikimediaLanguageCodes.getLanguageCode("unknown"));
 	}
 
 	@Test
diff --git a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/interfaces/NullEntityIdsTest.java b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/interfaces/NullEntityIdsTest.java
index 0aa0038a..0260fc2b 100644
--- a/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/interfaces/NullEntityIdsTest.java
+++ b/wdtk-datamodel/src/test/java/org/wikidata/wdtk/datamodel/interfaces/NullEntityIdsTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.datamodel.interfaces;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,9 +18,11 @@ package org.wikidata.wdtk.datamodel.interfaces;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.datamodel.interfaces;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class NullEntityIdsTest {
 
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/JsonDumpFileProcessingTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/JsonDumpFileProcessingTest.java
index f9721aa7..d14336e8 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/JsonDumpFileProcessingTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/JsonDumpFileProcessingTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,16 +18,19 @@ package org.wikidata.wdtk.dumpfiles;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.dumpfiles;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.net.URL;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.interfaces.EntityDocumentProcessor;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
 import org.wikidata.wdtk.dumpfiles.wmf.WmfDumpFile;
@@ -113,8 +114,8 @@ public class JsonDumpFileProcessingTest {
 	/**
 	 * TODO: fix on JDK 9 and enable again
 	 */
-	@Test(expected = EntityTimerProcessor.TimeoutException.class)
-	@Ignore
+	@Test
+	@Disabled
 	public void testTimeout() throws IOException {
 		Path dmPath = Paths.get(System.getProperty("user.dir"));
 		MockDirectoryManager dm = new MockDirectoryManager(dmPath, true, true);
@@ -132,7 +133,7 @@ public class JsonDumpFileProcessingTest {
 				true);
 
 		timer.open();
-		dpc.processMostRecentJsonDump();
+		assertThrows(EntityTimerProcessor.TimeoutException.class, () -> dpc.processMostRecentJsonDump());
 		timer.close();
 	}
 
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwDumpFileProcessingTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwDumpFileProcessingTest.java
index 3accf262..a29c40a3 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwDumpFileProcessingTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwDumpFileProcessingTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,7 +18,9 @@ package org.wikidata.wdtk.dumpfiles;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.dumpfiles;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.IOException;
 import java.net.URL;
@@ -30,8 +30,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 import org.wikidata.wdtk.datamodel.interfaces.EntityDocumentProcessor;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
@@ -99,7 +99,7 @@ public class MwDumpFileProcessingTest {
 
 	}
 
-	@Before
+	@BeforeEach
 	public void configureDirectoryManager() {
 		DirectoryManagerFactory
 				.setDirectoryManagerClass(MockDirectoryManager.class);
@@ -204,30 +204,30 @@ public class MwDumpFileProcessingTest {
 	 */
 	private void assertEqualRevisions(MwRevision rev1, MwRevision rev2,
 			String test) {
-		assertEquals("[" + test + "] Revision prefixed titles do not match:",
-				rev1.getPrefixedTitle(), rev2.getPrefixedTitle());
-		assertEquals("[" + test + "] Revision namespaces do not match:",
-				rev1.getNamespace(), rev2.getNamespace());
-		assertEquals("[" + test + "] Revision page ids do not match:",
-				rev1.getPageId(), rev2.getPageId());
-		assertEquals("[" + test + "] Revision ids do not match:",
-				rev1.getRevisionId(), rev2.getRevisionId());
-		assertEquals("[" + test + "] Revision parent ids do not match:",
-				rev1.getParentRevisionId(), rev2.getParentRevisionId());
-		assertEquals("[" + test + "] Revision timestamps do not match:",
-				rev1.getTimeStamp(), rev2.getTimeStamp());
-		assertEquals("[" + test + "] Revision formats do not match:",
-				rev1.getFormat(), rev2.getFormat());
-		assertEquals("[" + test + "] Revision models do not match:",
-				rev1.getModel(), rev2.getModel());
-		assertEquals("[" + test + "] Revision comments do not match:",
-				rev1.getComment(), rev2.getComment());
-		assertEquals("[" + test + "] Revision texts do not match:",
-				rev1.getText(), rev2.getText());
-		assertEquals("[" + test + "] Revision contributors do not match:",
-				rev1.getContributor(), rev2.getContributor());
-		assertEquals("[" + test + "] Revision contributor ids do not match:",
-				rev1.getContributorId(), rev2.getContributorId());
+		assertEquals(rev1.getPrefixedTitle(), rev2.getPrefixedTitle(),
+				"[" + test + "] Revision prefixed titles do not match:");
+		assertEquals(rev1.getNamespace(), rev2.getNamespace(),
+				"[" + test + "] Revision namespaces do not match:");
+		assertEquals(rev1.getPageId(), rev2.getPageId(),
+				"[" + test + "] Revision page ids do not match:");
+		assertEquals(rev1.getRevisionId(), rev2.getRevisionId(),
+				"[" + test + "] Revision ids do not match:");
+		assertEquals(rev1.getParentRevisionId(), rev2.getParentRevisionId(),
+				"[" + test + "] Revision parent ids do not match:");
+		assertEquals(rev1.getTimeStamp(), rev2.getTimeStamp(),
+				"[" + test + "] Revision timestamps do not match:");
+		assertEquals(rev1.getFormat(), rev2.getFormat(),
+				"[" + test + "] Revision formats do not match:");
+		assertEquals(rev1.getModel(), rev2.getModel(),
+				"[" + test + "] Revision models do not match:");
+		assertEquals(rev1.getComment(), rev2.getComment(),
+				"[" + test + "] Revision comments do not match:");
+		assertEquals(rev1.getText(), rev2.getText(),
+				"[" + test + "] Revision texts do not match:");
+		assertEquals(rev1.getContributor(), rev2.getContributor(),
+				"[" + test + "] Revision contributors do not match:");
+		assertEquals(rev1.getContributorId(), rev2.getContributorId(),
+				"[" + test + "] Revision contributor ids do not match:");
 	}
 
 	/**
@@ -238,8 +238,8 @@ public class MwDumpFileProcessingTest {
 	 */
 	private void assertEqualRevisionLists(List<MwRevision> list1,
 			List<MwRevision> list2, String test) {
-		assertEquals("[" + test + "] Size of revision lists does not match:",
-				list1.size(), list2.size());
+		assertEquals(list1.size(), list2.size(),
+				"[" + test + "] Size of revision lists does not match:");
 		for (int i = 0; i < list1.size(); i++) {
 			assertEqualRevisions(list1.get(i), list2.get(i), test + "-item" + i);
 		}
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwLocalDumpFileTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwLocalDumpFileTest.java
index 4fb5d786..de133f16 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwLocalDumpFileTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/MwLocalDumpFileTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,24 +18,30 @@ package org.wikidata.wdtk.dumpfiles;
  * #L%
  */
 
+package org.wikidata.wdtk.dumpfiles;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.testing.MockDirectoryManager;
 import org.wikidata.wdtk.util.CompressionType;
 import org.wikidata.wdtk.util.DirectoryManagerFactory;
 
-import static org.junit.Assert.*;
-
 public class MwLocalDumpFileTest {
 	MockDirectoryManager dm;
 	Path dmPath;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws Exception {
 		DirectoryManagerFactory
 				.setDirectoryManagerClass(MockDirectoryManager.class);
@@ -107,11 +111,11 @@ public class MwLocalDumpFileTest {
 		assertNull(br.readLine());
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void testUnavailableReader() throws IOException {
 		MwLocalDumpFile df = new MwLocalDumpFile(
 				"/testdump-20150512.json.gz");
-		df.getDumpFileReader();
+		assertThrows(IOException.class, () -> df.getDumpFileReader());
 	}
 
 	@Test
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/SitesTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/SitesTest.java
index 0e2c0414..28c6028c 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/SitesTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/SitesTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,7 +18,9 @@ package org.wikidata.wdtk.dumpfiles;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.dumpfiles;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.IOException;
 import java.net.URL;
@@ -28,8 +28,8 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Collections;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl;
 import org.wikidata.wdtk.datamodel.implementation.SitesImpl;
 import org.wikidata.wdtk.datamodel.interfaces.DataObjectFactory;
@@ -45,7 +45,7 @@ public class SitesTest {
 	Path dmPath;
 	DumpProcessingController dpc;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws IOException {
 		this.dmPath = Paths.get(System.getProperty("user.dir"));
 		this.dm = new MockDirectoryManager(this.dmPath, true, true);
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileManagerTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileManagerTest.java
index b3b41c0c..445ac167 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileManagerTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileManagerTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles.wmf;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -10,9 +8,8 @@ package org.wikidata.wdtk.dumpfiles.wmf;
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
+ *      http://www.apache.org/licenses/LI
+import org.junit.jupiter.api.Test; required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
@@ -20,9 +17,11 @@ package org.wikidata.wdtk.dumpfiles.wmf;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.dumpfiles.wmf;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -30,8 +29,8 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.List;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.dumpfiles.DumpContentType;
 import org.wikidata.wdtk.dumpfiles.MwDumpFile;
 import org.wikidata.wdtk.dumpfiles.MwDumpFileProcessor;
@@ -70,7 +69,7 @@ public class WmfDumpFileManagerTest {
 
 	}
 
-	@Before
+	@BeforeEach
 	public void setUp() throws IOException {
 		this.wrf = new MockWebResourceFetcher();
 		this.dmPath = Paths.get(System.getProperty("user.dir"));
@@ -134,12 +133,12 @@ public class WmfDumpFileManagerTest {
 			assertEquals(dumpFiles.get(i).getDateStamp(), dumpDates[i]);
 			if (dumpIsLocal[i]) {
 				assertTrue(
-						"Dumpfile " + dumpFiles.get(i) + " should be local.",
-						dumpFiles.get(i) instanceof WmfLocalDumpFile);
+						dumpFiles.get(i) instanceof WmfLocalDumpFile,
+						"Dumpfile " + dumpFiles.get(i) + " should be local.");
 			} else {
-				assertTrue("Dumpfile " + dumpFiles.get(i)
-						+ " should be online.",
-						dumpFiles.get(i) instanceof WmfOnlineDailyDumpFile);
+				assertTrue(
+						dumpFiles.get(i) instanceof WmfOnlineDailyDumpFile,
+						"Dumpfile " + dumpFiles.get(i) + " should be online.");
 			}
 		}
 	}
@@ -174,12 +173,12 @@ public class WmfDumpFileManagerTest {
 			assertEquals(dumpFiles.get(i).getDateStamp(), dumpDates[i]);
 			if (dumpIsLocal[i]) {
 				assertTrue(
-						"Dumpfile " + dumpFiles.get(i) + " should be local.",
-						dumpFiles.get(i) instanceof WmfLocalDumpFile);
+						dumpFiles.get(i) instanceof WmfLocalDumpFile,
+						"Dumpfile " + dumpFiles.get(i) + " should be local.");
 			} else {
-				assertTrue("Dumpfile " + dumpFiles.get(i)
-						+ " should be online.",
-						dumpFiles.get(i) instanceof JsonOnlineDumpFile);
+				assertTrue(
+						dumpFiles.get(i) instanceof JsonOnlineDumpFile,
+						"Dumpfile " + dumpFiles.get(i) + " should be online.");
 			}
 		}
 	}
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileTest.java
index efb53d60..c4c231c3 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfDumpFileTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles.wmf;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,10 +18,12 @@ package org.wikidata.wdtk.dumpfiles.wmf;
  * #L%
  */
 
-import org.junit.Test;
-import org.wikidata.wdtk.util.CompressionType;
+package org.wikidata.wdtk.dumpfiles.wmf;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import static org.junit.Assert.assertEquals;
+import org.junit.jupiter.api.Test;
+import org.wikidata.wdtk.util.CompressionType;
 
 public class WmfDumpFileTest {
 
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfLocalDumpFileTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfLocalDumpFileTest.java
index 4e22d816..0f161668 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfLocalDumpFileTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfLocalDumpFileTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles.wmf;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,14 +18,17 @@ package org.wikidata.wdtk.dumpfiles.wmf;
  * #L%
  */
 
-import static org.junit.Assert.assertFalse;
+package org.wikidata.wdtk.dumpfiles.wmf;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mockito;
 import org.wikidata.wdtk.dumpfiles.DumpContentType;
 import org.wikidata.wdtk.testing.MockDirectoryManager;
@@ -37,28 +38,28 @@ public class WmfLocalDumpFileTest {
 	MockDirectoryManager dm;
 	Path dmPath;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws Exception {
 		this.dmPath = Paths.get(System.getProperty("user.dir"))
 				.resolve("dumpfiles").resolve("wikidatawiki");
 		this.dm = new MockDirectoryManager(this.dmPath, true, true);
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void directoryDoesNotExist() {
-		new WmfLocalDumpFile("20140220", "wikidatawiki", dm,
-				DumpContentType.DAILY);
+		assertThrows(IllegalArgumentException.class, () -> new WmfLocalDumpFile("20140220", "wikidatawiki", dm,
+				DumpContentType.DAILY));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void directoryNotReadable() throws IOException {
 		MockDirectoryManager dm = Mockito.mock(MockDirectoryManager.class);
 		Mockito.when(dm.hasSubdirectory("daily-20140220")).thenReturn(true);
 		Mockito.doThrow(new IOException()).when(dm)
 				.getSubdirectoryManager("daily-20140220");
 
-		new WmfLocalDumpFile("20140220", "wikidatawiki", dm,
-				DumpContentType.DAILY);
+		assertThrows(IllegalArgumentException.class, () -> new WmfLocalDumpFile("20140220", "wikidatawiki", dm,
+				DumpContentType.DAILY));
 	}
 
 	@Test
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineDailyDumpFileTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineDailyDumpFileTest.java
index 39de2b72..486e1982 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineDailyDumpFileTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineDailyDumpFileTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles.wmf;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,25 +18,31 @@ package org.wikidata.wdtk.dumpfiles.wmf;
  * #L%
  */
 
+package org.wikidata.wdtk.dumpfiles.wmf;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.nio.file.Paths;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.dumpfiles.DumpContentType;
 import org.wikidata.wdtk.testing.MockDirectoryManager;
 import org.wikidata.wdtk.testing.MockWebResourceFetcher;
 import org.wikidata.wdtk.util.CompressionType;
 
-import static org.junit.Assert.*;
-
 public class WmfOnlineDailyDumpFileTest {
 
 	MockWebResourceFetcher wrf;
 	MockDirectoryManager dm;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws IOException {
 		dm = new MockDirectoryManager(
 				Paths.get(System.getProperty("user.dir")), true, false);
@@ -108,7 +112,7 @@ public class WmfOnlineDailyDumpFileTest {
 		assertFalse(dump.isAvailable());
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void downloadNoRevisionId() throws IOException {
 		String dateStamp = "20140220";
 		wrf.setWebResourceContents(
@@ -118,10 +122,10 @@ public class WmfOnlineDailyDumpFileTest {
 				CompressionType.BZ2);
 		WmfOnlineDailyDumpFile dump = new WmfOnlineDailyDumpFile(dateStamp,
 				"wikidatawiki", wrf, dm);
-		dump.getDumpFileReader();
+		assertThrows(IOException.class, () -> dump.getDumpFileReader());
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void downloadNoDumpFile() throws IOException {
 		String dateStamp = "20140220";
 		wrf.setWebResourceContents(
@@ -129,7 +133,7 @@ public class WmfOnlineDailyDumpFileTest {
 						+ dateStamp + "/status.txt", "done");
 		WmfOnlineDailyDumpFile dump = new WmfOnlineDailyDumpFile(dateStamp,
 				"wikidatawiki", wrf, dm);
-		dump.getDumpFileReader();
+		assertThrows(IOException.class, () -> dump.getDumpFileReader());
 	}
 
 }
diff --git a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineStandardDumpFileTest.java b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineStandardDumpFileTest.java
index b0ae5360..1ae1a643 100644
--- a/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineStandardDumpFileTest.java
+++ b/wdtk-dumpfiles/src/test/java/org/wikidata/wdtk/dumpfiles/wmf/WmfOnlineStandardDumpFileTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.dumpfiles.wmf;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,26 +18,32 @@ package org.wikidata.wdtk.dumpfiles.wmf;
  * #L%
  */
 
+package org.wikidata.wdtk.dumpfiles.wmf;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.nio.file.Paths;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.dumpfiles.DumpContentType;
 import org.wikidata.wdtk.dumpfiles.MwDumpFile;
 import org.wikidata.wdtk.testing.MockDirectoryManager;
 import org.wikidata.wdtk.testing.MockWebResourceFetcher;
 import org.wikidata.wdtk.util.CompressionType;
 
-import static org.junit.Assert.*;
-
 public class WmfOnlineStandardDumpFileTest {
 
 	MockWebResourceFetcher wrf;
 	MockDirectoryManager dm;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws IOException {
 		dm = new MockDirectoryManager(
 				Paths.get(System.getProperty("user.dir")), true, false);
@@ -134,7 +138,7 @@ public class WmfOnlineStandardDumpFileTest {
 		assertEquals(DumpContentType.FULL, dump.getDumpContentType());
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void downloadNoRevisionId() throws IOException {
 		wrf.setWebResourceContents(
 				"http://dumps.wikimedia.org/wikidatawiki/20140210/wikidatawiki-20140210-pages-meta-current.xml.bz2",
@@ -144,10 +148,10 @@ public class WmfOnlineStandardDumpFileTest {
 				"/wikidatawiki-20140210-md5sums.txt", this.getClass());
 		MwDumpFile dump = new WmfOnlineStandardDumpFile("20140210",
 				"wikidatawiki", wrf, dm, DumpContentType.FULL);
-		dump.getDumpFileReader();
+		assertThrows(IOException.class, () -> dump.getDumpFileReader());
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void downloadNoMd5sum() throws IOException {
 		wrf.setWebResourceContents(
 				"http://dumps.wikimedia.org/wikidatawiki/20140210/wikidatawiki-20140210-pages-meta-current.xml.bz2",
@@ -157,10 +161,10 @@ public class WmfOnlineStandardDumpFileTest {
 				"/wikidatawiki-20140210-index.html", this.getClass());
 		MwDumpFile dump = new WmfOnlineStandardDumpFile("20140210",
 				"wikidatawiki", wrf, dm, DumpContentType.FULL);
-		dump.getDumpFileReader();
+		assertThrows(IOException.class, () -> dump.getDumpFileReader());
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void downloadNoDumpFile() throws IOException {
 		wrf.setWebResourceContentsFromResource(
 				"http://dumps.wikimedia.org/wikidatawiki/20140210/",
@@ -170,7 +174,7 @@ public class WmfOnlineStandardDumpFileTest {
 				"/wikidatawiki-20140210-md5sums.txt", this.getClass());
 		MwDumpFile dump = new WmfOnlineStandardDumpFile("20140210",
 				"wikidatawiki", wrf, dm, DumpContentType.CURRENT);
-		dump.getDumpFileReader();
+		assertThrows(IOException.class, () -> dump.getDumpFileReader());
 	}
 
 }
diff --git a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/MockPropertyRegister.java b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/MockPropertyRegister.java
index 8a3baea3..a783c956 100644
--- a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/MockPropertyRegister.java
+++ b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/MockPropertyRegister.java
@@ -20,10 +20,11 @@
 
 package org.wikidata.wdtk.rdf;
 
+import static org.junit.jupiter.api.Assertions.fail;
+
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Assert;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
@@ -50,7 +51,7 @@ public class MockPropertyRegister extends PropertyRegister {
 
 	@Override
 	protected void fetchPropertyInformation(PropertyIdValue startProperty) {
-		Assert.fail("Please add " + startProperty
+		fail("Please add " + startProperty
 				+ "to the datatypes and uriPatterns map.");
 	}
 
diff --git a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/PropertyRegisterTest.java b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/PropertyRegisterTest.java
index d53628ed..9a6a7eaf 100644
--- a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/PropertyRegisterTest.java
+++ b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/PropertyRegisterTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.rdf;
-
 /*
  * #%L
  * Wikidata Toolkit RDF
@@ -20,16 +18,22 @@ package org.wikidata.wdtk.rdf;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.rdf;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import org.hamcrest.core.IsCollectionContaining;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Matchers;
 import org.mockito.Mockito;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
@@ -55,7 +59,7 @@ public class PropertyRegisterTest {
 	final TestObjectFactory objectFactory = new TestObjectFactory();
 	final DataObjectFactory dataObjectFactory = new DataObjectFactoryImpl();
 
-	@Before
+	@BeforeEach
 	public void setUp() throws MediaWikiApiErrorException, IOException {
 		Map<String, EntityDocument> mockResult = new HashMap<>();
 		List<StatementGroup> mockStatementGroups = new ArrayList<>();
@@ -189,8 +193,8 @@ public class PropertyRegisterTest {
 		// Check twice to test fast failing on retry
 		assertNull(this.propertyRegister.getPropertyType(dataObjectFactory
 				.getPropertyIdValue("P10000", this.siteIri)));
-		assertEquals("no requests should be made if the property is known to be missing",
-				smallestBefore, this.propertyRegister.smallestUnfetchedPropertyIdNumber);
+		assertEquals(smallestBefore, this.propertyRegister.smallestUnfetchedPropertyIdNumber,
+				"no requests should be made if the property is known to be missing");
 	}
 
 	@Test
diff --git a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfConverterTest.java b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfConverterTest.java
index 5c5261ca..49736c59 100644
--- a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfConverterTest.java
+++ b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfConverterTest.java
@@ -20,7 +20,7 @@
 
 package org.wikidata.wdtk.rdf;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -36,9 +36,9 @@ import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
 import org.eclipse.rdf4j.rio.RDFFormat;
 import org.eclipse.rdf4j.rio.RDFHandlerException;
 import org.eclipse.rdf4j.rio.RDFParseException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.StatementBuilder;
 import org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl;
@@ -71,7 +71,7 @@ public class RdfConverterTest {
 	final TestObjectFactory objectFactory = new TestObjectFactory();
 	final DataObjectFactory dataObjectFactory = new DataObjectFactoryImpl();
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		this.out = new ByteArrayOutputStream();
 		this.rdfWriter = new RdfWriter(RDFFormat.TURTLE, out);
@@ -300,7 +300,7 @@ public class RdfConverterTest {
 				.getResourceFromFile("InterPropertyLinks.rdf")), model);
 	}
 
-	@After
+	@AfterEach
 	public void clear() throws RDFHandlerException, IOException {
 		this.out.close();
 	}
diff --git a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfSerializerTest.java b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfSerializerTest.java
index fc75d0a9..7861112e 100644
--- a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfSerializerTest.java
+++ b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/RdfSerializerTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.rdf;
-
 /*
  * #%L
  * Wikidata Toolkit RDF
@@ -20,17 +18,19 @@ package org.wikidata.wdtk.rdf;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.rdf;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
-import org.junit.Before;
-import org.junit.Test;
 import org.eclipse.rdf4j.model.Model;
 import org.eclipse.rdf4j.rio.RDFFormat;
 import org.eclipse.rdf4j.rio.RDFHandlerException;
 import org.eclipse.rdf4j.rio.RDFParseException;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.implementation.SitesImpl;
 
 public class RdfSerializerTest {
@@ -41,7 +41,7 @@ public class RdfSerializerTest {
 
 	RdfSerializer rdfSerializer;
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		this.out = new ByteArrayOutputStream();
 		this.rdfSerializer = new RdfSerializer(RDFFormat.TURTLE, this.out,
diff --git a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/values/ValueRdfConverterTest.java b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/values/ValueRdfConverterTest.java
index 80e11700..5f65ee96 100644
--- a/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/values/ValueRdfConverterTest.java
+++ b/wdtk-rdf/src/test/java/org/wikidata/wdtk/rdf/values/ValueRdfConverterTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.rdf.values;
-
 /*
  * #%L
  * Wikidata Toolkit RDF
@@ -20,15 +18,15 @@ package org.wikidata.wdtk.rdf.values;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.rdf.values;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.math.BigDecimal;
 
-import org.junit.Before;
-import org.junit.Test;
 import org.eclipse.rdf4j.model.BNode;
 import org.eclipse.rdf4j.model.Model;
 import org.eclipse.rdf4j.model.Resource;
@@ -36,6 +34,8 @@ import org.eclipse.rdf4j.model.Value;
 import org.eclipse.rdf4j.rio.RDFFormat;
 import org.eclipse.rdf4j.rio.RDFHandlerException;
 import org.eclipse.rdf4j.rio.RDFParseException;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.DatamodelMapper;
 import org.wikidata.wdtk.datamodel.implementation.DataObjectFactoryImpl;
 import org.wikidata.wdtk.datamodel.implementation.UnsupportedEntityIdValueImpl;
@@ -62,7 +62,7 @@ public class ValueRdfConverterTest {
 
 	DataObjectFactory objectFactory = new DataObjectFactoryImpl();
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		this.out = new ByteArrayOutputStream();
 		this.rdfWriter = new RdfWriter(RDFFormat.TURTLE, this.out);
diff --git a/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorImplTest.java b/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorImplTest.java
index 2cc7231e..61ef45d4 100644
--- a/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorImplTest.java
+++ b/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorImplTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.storage.datastructures;
-
 /*
  * #%L
  * Wikidata Toolkit Data Model
@@ -20,8 +18,15 @@ package org.wikidata.wdtk.storage.datastructures;
  * #L%
  */
 
-import org.junit.Assert;
-import org.junit.Test;
+package org.wikidata.wdtk.storage.datastructures;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import org.junit.jupiter.api.Test;
 
 /**
  * Test class for {@link BitVectorImpl}.
@@ -41,33 +46,33 @@ public class BitVectorImplTest {
 	 *            another bit vector
 	 */
 	void assertEqualsForBitVector(BitVector bv0, BitVector bv1) {
-		Assert.assertEquals(bv0, bv0);
-		Assert.assertEquals(bv0, bv1);
-		Assert.assertEquals(bv1, bv0);
-		Assert.assertEquals(bv0.hashCode(), bv1.hashCode());
+		assertEquals(bv0, bv0);
+		assertEquals(bv0, bv1);
+		assertEquals(bv1, bv0);
+		assertEquals(bv0.hashCode(), bv1.hashCode());
 	}
 
 	@Test
 	public void testAdd() {
 		BitVectorImpl bv = new BitVectorImpl();
-		Assert.assertEquals(0, bv.size());
+		assertEquals(0, bv.size());
 
 		bv.addBit(true);
-		Assert.assertEquals(1, bv.size());
-		Assert.assertTrue(bv.getBit(0));
+		assertEquals(1, bv.size());
+		assertTrue(bv.getBit(0));
 
 		bv.addBit(false);
-		Assert.assertEquals(2, bv.size());
-		Assert.assertFalse(bv.getBit(1));
+		assertEquals(2, bv.size());
+		assertFalse(bv.getBit(1));
 
 		bv.addBit(false);
-		Assert.assertEquals(3, bv.size());
-		Assert.assertFalse(bv.getBit(2));
+		assertEquals(3, bv.size());
+		assertFalse(bv.getBit(2));
 
 		for (int i = 3; i < 0x1000; i++) {
 			boolean value = (i % 3) == 0;
 			bv.addBit(value);
-			Assert.assertEquals(value, bv.getBit(i));
+			assertEquals(value, bv.getBit(i));
 		}
 	}
 
@@ -85,8 +90,8 @@ public class BitVectorImplTest {
 	public void testEqualityAndCopyConstructor() {
 		int aLargeNumber = 0x100000;
 		BitVectorImpl bv0 = new BitVectorImpl();
-		Assert.assertEquals(bv0, bv0);
-		Assert.assertNotEquals(bv0, new Object());
+		assertEquals(bv0, bv0);
+		assertNotEquals(bv0, new Object());
 		BitVectorImpl bv1 = new BitVectorImpl();
 
 		PseudorandomBooleanGenerator generator = new PseudorandomBooleanGenerator(
@@ -104,12 +109,12 @@ public class BitVectorImplTest {
 		bv1.setBit(0x12345, false);
 		bv2.setBit(0x12345, true);
 
-		Assert.assertNotEquals(bv1, bv2);
-		Assert.assertNotEquals(bv2, bv1);
+		assertNotEquals(bv1, bv2);
+		assertNotEquals(bv2, bv1);
 
 		RankedBitVectorImpl bv3 = new RankedBitVectorImpl(bv2);
-		Assert.assertNotEquals(bv1, bv3);
-		Assert.assertNotEquals(bv3, bv1);
+		assertNotEquals(bv1, bv3);
+		assertNotEquals(bv3, bv1);
 	}
 
 	@Test
@@ -117,28 +122,28 @@ public class BitVectorImplTest {
 		long word = 0;
 
 		for (byte i = 0; i < 0x40; i++) {
-			Assert.assertFalse(BitVectorImpl.getBitInWord(i, word));
+			assertFalse(BitVectorImpl.getBitInWord(i, word));
 		}
 
 		word = 0x0810F;
 
-		Assert.assertTrue(BitVectorImpl.getBitInWord((byte) 0, word));
-		Assert.assertTrue(BitVectorImpl.getBitInWord((byte) 1, word));
-		Assert.assertTrue(BitVectorImpl.getBitInWord((byte) 2, word));
-		Assert.assertTrue(BitVectorImpl.getBitInWord((byte) 3, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 4, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 5, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 6, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 7, word));
-		Assert.assertTrue(BitVectorImpl.getBitInWord((byte) 8, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 9, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 10, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 11, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 12, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 13, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 14, word));
-		Assert.assertTrue(BitVectorImpl.getBitInWord((byte) 15, word));
-		Assert.assertFalse(BitVectorImpl.getBitInWord((byte) 16, word));
+		assertTrue(BitVectorImpl.getBitInWord((byte) 0, word));
+		assertTrue(BitVectorImpl.getBitInWord((byte) 1, word));
+		assertTrue(BitVectorImpl.getBitInWord((byte) 2, word));
+		assertTrue(BitVectorImpl.getBitInWord((byte) 3, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 4, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 5, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 6, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 7, word));
+		assertTrue(BitVectorImpl.getBitInWord((byte) 8, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 9, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 10, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 11, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 12, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 13, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 14, word));
+		assertTrue(BitVectorImpl.getBitInWord((byte) 15, word));
+		assertFalse(BitVectorImpl.getBitInWord((byte) 16, word));
 
 	}
 
@@ -146,66 +151,66 @@ public class BitVectorImplTest {
 	public void testHashCode() {
 		{
 			BitVectorImpl bv = new BitVectorImpl();
-			Assert.assertEquals(0, bv.hashCode());
+			assertEquals(0, bv.hashCode());
 
 			bv.addBit(false);
-			Assert.assertEquals(1, bv.hashCode());
+			assertEquals(1, bv.hashCode());
 		}
 		{
 			BitVectorImpl bv = new BitVectorImpl();
-			Assert.assertEquals(0, bv.hashCode());
+			assertEquals(0, bv.hashCode());
 
 			bv.addBit(true);
-			Assert.assertEquals(0x20, bv.hashCode());
+			assertEquals(0x20, bv.hashCode());
 		}
 	}
 
 	@Test
 	public void testGetOutOfRange() {
-		Assert.assertFalse(new BitVectorImpl().getBit(1));
-		Assert.assertFalse(new BitVectorImpl().getBit(Long.MAX_VALUE));
+		assertFalse(new BitVectorImpl().getBit(1));
+		assertFalse(new BitVectorImpl().getBit(Long.MAX_VALUE));
 	}
 
 	@Test
 	public void testSetOutOfRange() {
 		BitVectorImpl bv = new BitVectorImpl();
-		Assert.assertEquals(0, bv.size());
+		assertEquals(0, bv.size());
 		bv.setBit(41, true);
-		Assert.assertEquals(42, bv.size());
-		Assert.assertFalse(bv.getBit(40));
-		Assert.assertTrue(bv.getBit(41));
-		Assert.assertFalse(bv.getBit(42));
-		Assert.assertFalse(bv.getBit(43));
+		assertEquals(42, bv.size());
+		assertFalse(bv.getBit(40));
+		assertTrue(bv.getBit(41));
+		assertFalse(bv.getBit(42));
+		assertFalse(bv.getBit(43));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidInitialSize() {
-		new BitVectorImpl(-1);
+		assertThrows(IllegalArgumentException.class, () -> new BitVectorImpl(-1));
 	}
 
-	@Test(expected = IndexOutOfBoundsException.class)
+	@Test
 	public void testInvalidPositionSizeGet00() {
-		(new BitVectorImpl()).getBit(-1);
+		assertThrows(IndexOutOfBoundsException.class, () -> new BitVectorImpl().getBit(-1));
 	}
 
-	@Test(expected = IndexOutOfBoundsException.class)
+	@Test
 	public void testInvalidPositionSizeGet01() {
-		BitVectorImpl.getBitInWord((byte) -1, 0);
+		assertThrows(IndexOutOfBoundsException.class, () -> BitVectorImpl.getBitInWord((byte) -1, 0));
 	}
 
-	@Test(expected = IndexOutOfBoundsException.class)
+	@Test
 	public void testInvalidPositionSizeGet02() {
-		BitVectorImpl.getBitInWord((byte) 0x40, 0);
+		assertThrows(IndexOutOfBoundsException.class, () -> BitVectorImpl.getBitInWord((byte) 0x40, 0));
 	}
 
-	@Test(expected = IndexOutOfBoundsException.class)
+	@Test
 	public void testInvalidPositionSizeSet00() {
-		BitVectorImpl.setBitInWord((byte) -1, true, 0);
+		assertThrows(IndexOutOfBoundsException.class, () -> BitVectorImpl.setBitInWord((byte) -1, true, 0));
 	}
 
-	@Test(expected = IndexOutOfBoundsException.class)
+	@Test
 	public void testInvalidPositionSizeSet01() {
-		BitVectorImpl.setBitInWord((byte) 0x40, false, 0);
+		assertThrows(IndexOutOfBoundsException.class, () -> BitVectorImpl.setBitInWord((byte) 0x40, false, 0));
 	}
 
 	@Test
@@ -217,7 +222,7 @@ public class BitVectorImplTest {
 		}
 
 		for (byte i = 0; i < 0x40; i++) {
-			Assert.assertTrue(BitVectorImpl.getBitInWord(i, word));
+			assertTrue(BitVectorImpl.getBitInWord(i, word));
 		}
 
 		for (byte i = 0; i < 0x40; i++) {
@@ -225,25 +230,25 @@ public class BitVectorImplTest {
 		}
 
 		for (byte i = 0; i < 0x40; i++) {
-			Assert.assertFalse(BitVectorImpl.getBitInWord(i, word));
+			assertFalse(BitVectorImpl.getBitInWord(i, word));
 		}
 
 		word = 0x0362;
 		for (byte i = 0; i < 0x40; i++) {
 			boolean value = BitVectorImpl.getBitInWord(i, word);
 			word = BitVectorImpl.setBitInWord(i, value, word);
-			Assert.assertEquals(value, BitVectorImpl.getBitInWord(i, word));
+			assertEquals(value, BitVectorImpl.getBitInWord(i, word));
 
 			value = !value;
 			word = BitVectorImpl.setBitInWord(i, value, word);
-			Assert.assertEquals(value, BitVectorImpl.getBitInWord(i, word));
+			assertEquals(value, BitVectorImpl.getBitInWord(i, word));
 
 			value = !value;
 			word = BitVectorImpl.setBitInWord(i, value, word);
-			Assert.assertEquals(value, BitVectorImpl.getBitInWord(i, word));
+			assertEquals(value, BitVectorImpl.getBitInWord(i, word));
 		}
 
-		Assert.assertEquals(0x0362, word);
+		assertEquals(0x0362, word);
 
 	}
 
@@ -251,18 +256,18 @@ public class BitVectorImplTest {
 	public void testSize() {
 		{
 			BitVectorImpl bv = new BitVectorImpl(0x100);
-			Assert.assertEquals(0x100, bv.size());
+			assertEquals(0x100, bv.size());
 			bv.addBit(false);
 			bv.addBit(true);
-			Assert.assertEquals(0x102, bv.size());
+			assertEquals(0x102, bv.size());
 		}
 
 		{
 			BitVectorImpl bv = new BitVectorImpl();
-			Assert.assertEquals(0, bv.size());
+			assertEquals(0, bv.size());
 			for (int i = 0; i < 0x300; i++) {
 				bv.addBit((i % 5) == 0);
-				Assert.assertEquals(i + 1, bv.size());
+				assertEquals(i + 1, bv.size());
 			}
 		}
 	}
@@ -274,39 +279,39 @@ public class BitVectorImplTest {
 			boolean value = (i % 3) == 0;
 			bv.addBit(value);
 		}
-		Assert.assertEquals("1001001001001001", bv.toString());
+		assertEquals("1001001001001001", bv.toString());
 
 		for (int i = 0; i < 0x10; i++) {
 			boolean value = (i % 2) == 0;
 			bv.addBit(value);
 		}
-		Assert.assertEquals("10010010010010011010101010101010", bv.toString());
+		assertEquals("10010010010010011010101010101010", bv.toString());
 
 		for (int i = 0; i < 0x20; i++) {
 			bv.setBit(i, bv.getBit(i));
 		}
-		Assert.assertEquals("10010010010010011010101010101010", bv.toString());
+		assertEquals("10010010010010011010101010101010", bv.toString());
 
 		for (int i = 0; i < 0x20; i++) {
 			bv.setBit(i, !bv.getBit(i));
 		}
-		Assert.assertEquals("01101101101101100101010101010101", bv.toString());
+		assertEquals("01101101101101100101010101010101", bv.toString());
 
 	}
 
 	@Test
 	public void testWordToString() {
 		long word = 0;
-		Assert.assertEquals(
+		assertEquals(
 				"0000000000000000000000000000000000000000000000000000000000000000",
 				BitVectorImpl.wordToString(word));
 		word = -1;
-		Assert.assertEquals(
+		assertEquals(
 				"1111111111111111111111111111111111111111111111111111111111111111",
 				BitVectorImpl.wordToString(word));
 
 		word = 0x362;
-		Assert.assertEquals(
+		assertEquals(
 				"0100011011000000000000000000000000000000000000000000000000000000",
 				BitVectorImpl.wordToString(word));
 	}
diff --git a/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorIteratorTest.java b/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorIteratorTest.java
index 250a4ac5..50566c64 100644
--- a/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorIteratorTest.java
+++ b/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/BitVectorIteratorTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.storage.datastructures;
-
 /*
  * #%L
  * Wikidata Toolkit Storage
@@ -20,12 +18,18 @@ package org.wikidata.wdtk.storage.datastructures;
  * #L%
  */
 
+package org.wikidata.wdtk.storage.datastructures;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test class for {@link BitVectorIterator}.
@@ -38,17 +42,17 @@ public class BitVectorIteratorTest {
 	@Test
 	public void testHashCode() {
 		Iterator<Boolean> it = (new BitVectorImpl()).iterator();
-		Assert.assertEquals(0, it.hashCode());
+		assertEquals(0, it.hashCode());
 	}
 
-	@Test(expected = NoSuchElementException.class)
+	@Test
 	public void testNoSuchElementException() {
-		new BitVectorImpl().iterator().next();
+		assertThrows(NoSuchElementException.class, () -> new BitVectorImpl().iterator().next());
 	}
 
-	@Test(expected = UnsupportedOperationException.class)
+	@Test
 	public void testUnsupportedOperationException() {
-		new BitVectorImpl().iterator().remove();
+		assertThrows(UnsupportedOperationException.class, () -> new BitVectorImpl().iterator().remove());
 	}
 
 	@Test
@@ -57,9 +61,9 @@ public class BitVectorIteratorTest {
 		BitVectorImpl bv1 = new BitVectorImpl();
 
 		Iterator<Boolean> it = bv0.iterator();
-		Assert.assertEquals(it, it);
-		Assert.assertEquals(bv0.iterator(), bv1.iterator());
-		Assert.assertNotEquals(bv0.iterator(), Collections.emptyIterator());
+		assertEquals(it, it);
+		assertEquals(bv0.iterator(), bv1.iterator());
+		assertNotEquals(bv0.iterator(), Collections.emptyIterator());
 
 		PseudorandomBooleanGenerator generator0 = new PseudorandomBooleanGenerator(
 				0x1234);
@@ -74,13 +78,13 @@ public class BitVectorIteratorTest {
 		int i = 0;
 		for (boolean value : bv0) {
 			boolean expectedValue = generator1.getPseudorandomBoolean();
-			Assert.assertEquals(expectedValue, value);
+			assertEquals(expectedValue, value);
 			i++;
 		}
 
-		Assert.assertEquals(i, 0x1000);
-		Assert.assertEquals(bv0.iterator(), bv1.iterator());
-		Assert.assertNotEquals(bv0.iterator(), (new BitVectorImpl()).iterator());
+		assertEquals(i, 0x1000);
+		assertEquals(bv0.iterator(), bv1.iterator());
+		assertNotEquals(bv0.iterator(), (new BitVectorImpl()).iterator());
 	}
 
 	@Test
@@ -94,12 +98,12 @@ public class BitVectorIteratorTest {
 
 			{
 				Iterator<Boolean> it = bv.iterator();
-				Assert.assertTrue(it.hasNext());
+				assertTrue(it.hasNext());
 				int i = 0;
 				while (it.hasNext()) {
 					boolean expectedValue = ((i % 3) == 0);
 					boolean value = it.next();
-					Assert.assertEquals(expectedValue, value);
+					assertEquals(expectedValue, value);
 					i++;
 				}
 			}
@@ -116,7 +120,7 @@ public class BitVectorIteratorTest {
 				int i = 0;
 				for (boolean value : bv) {
 					boolean expectedValue = (i % 7) == 0;
-					Assert.assertEquals(expectedValue, value);
+					assertEquals(expectedValue, value);
 					i++;
 				}
 			}
diff --git a/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/RankedBitVectorImplTest.java b/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/RankedBitVectorImplTest.java
index a7ccd831..c4ee87ab 100644
--- a/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/RankedBitVectorImplTest.java
+++ b/wdtk-storage/src/test/java/org/wikidata/wdtk/storage/datastructures/RankedBitVectorImplTest.java
@@ -20,10 +20,15 @@
 
 package org.wikidata.wdtk.storage.datastructures;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.Iterator;
 
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test class for {@link RankedBitVectorImpl}.
@@ -58,11 +63,11 @@ public class RankedBitVectorImplTest {
 	void assertCorrectCount(RankedBitVector bv, long position) {
 		long expectedCountBitsFalse = countBits(bv, false, position);
 		long computedCountBitsFalse = bv.countBits(false, position);
-		Assert.assertEquals(expectedCountBitsFalse, computedCountBitsFalse);
+		assertEquals(expectedCountBitsFalse, computedCountBitsFalse);
 
 		long expectedCountBitsTrue = countBits(bv, true, position);
 		long computedCountBitsTrue = bv.countBits(true, position);
-		Assert.assertEquals(expectedCountBitsTrue, computedCountBitsTrue);
+		assertEquals(expectedCountBitsTrue, computedCountBitsTrue);
 	}
 
 	/**
@@ -91,12 +96,12 @@ public class RankedBitVectorImplTest {
 	void assertCorrectFindPosition(RankedBitVector bv, long nOccurrences) {
 		long expectedFindPositionFalse = findPosition(bv, false, nOccurrences);
 		long computedFindPositionFalse = bv.findPosition(false, nOccurrences);
-		Assert.assertEquals(expectedFindPositionFalse,
+		assertEquals(expectedFindPositionFalse,
 				computedFindPositionFalse);
 
 		long expectedFindPositionTrue = findPosition(bv, true, nOccurrences);
 		long computedFindPositionTrue = bv.findPosition(true, nOccurrences);
-		Assert.assertEquals(expectedFindPositionTrue, computedFindPositionTrue);
+		assertEquals(expectedFindPositionTrue, computedFindPositionTrue);
 	}
 
 	/**
@@ -109,10 +114,10 @@ public class RankedBitVectorImplTest {
 	 *            another bit vector
 	 */
 	void assertEqualsForBitVector(RankedBitVector bv0, RankedBitVector bv1) {
-		Assert.assertEquals(bv0, bv0);
-		Assert.assertEquals(bv0, bv1);
-		Assert.assertEquals(bv1, bv0);
-		Assert.assertEquals(bv0.hashCode(), bv1.hashCode());
+		assertEquals(bv0, bv0);
+		assertEquals(bv0, bv1);
+		assertEquals(bv1, bv0);
+		assertEquals(bv0.hashCode(), bv1.hashCode());
 	}
 
 	/**
@@ -170,24 +175,24 @@ public class RankedBitVectorImplTest {
 	@Test
 	public void testAdd() {
 		RankedBitVectorImpl bv = new RankedBitVectorImpl();
-		Assert.assertEquals(0, bv.size());
+		assertEquals(0, bv.size());
 
 		bv.addBit(true);
-		Assert.assertEquals(1, bv.size());
-		Assert.assertTrue(bv.getBit(0));
+		assertEquals(1, bv.size());
+		assertTrue(bv.getBit(0));
 
 		bv.addBit(false);
-		Assert.assertEquals(2, bv.size());
-		Assert.assertFalse(bv.getBit(1));
+		assertEquals(2, bv.size());
+		assertFalse(bv.getBit(1));
 
 		bv.addBit(false);
-		Assert.assertEquals(3, bv.size());
-		Assert.assertFalse(bv.getBit(2));
+		assertEquals(3, bv.size());
+		assertFalse(bv.getBit(2));
 
 		for (int i = 3; i < 0x1000; i++) {
 			boolean value = (i % 3) == 0;
 			bv.addBit(value);
-			Assert.assertEquals(value, bv.getBit(i));
+			assertEquals(value, bv.getBit(i));
 			assertCorrectCount(bv, i);
 		}
 	}
@@ -214,11 +219,11 @@ public class RankedBitVectorImplTest {
 	@Test
 	public void testEmptyBitVector() {
 		RankedBitVectorImpl bv0 = new RankedBitVectorImpl();
-		Assert.assertEquals(0, bv0.size());
+		assertEquals(0, bv0.size());
 		assertCorrectCount(bv0);
 		assertCorrectFindPosition(bv0);
-		Assert.assertNotEquals(bv0, new Object());
-		Assert.assertEquals(bv0, new BitVectorImpl());
+		assertNotEquals(bv0, new Object());
+		assertEquals(bv0, new BitVectorImpl());
 
 		RankedBitVector bv1 = new RankedBitVectorImpl();
 		RankedBitVectorImpl bv2 = new RankedBitVectorImpl(0);
@@ -256,12 +261,12 @@ public class RankedBitVectorImplTest {
 	}
 
 	void testFindPositionWithBitVector(RankedBitVectorImpl bv) {
-		Assert.assertEquals(0, bv.size());
+		assertEquals(0, bv.size());
 
 		bv.addBit(true);
 
-		Assert.assertEquals(RankedBitVector.NOT_FOUND, bv.findPosition(true, 0));
-		Assert.assertEquals(0, bv.findPosition(true, 1));
+		assertEquals(RankedBitVector.NOT_FOUND, bv.findPosition(true, 0));
+		assertEquals(0, bv.findPosition(true, 1));
 
 		bv.addBit(true);
 		bv.addBit(false);
@@ -271,50 +276,50 @@ public class RankedBitVectorImplTest {
 		bv.addBit(false);
 		bv.addBit(true);
 
-		Assert.assertEquals(RankedBitVector.NOT_FOUND,
+		assertEquals(RankedBitVector.NOT_FOUND,
 				bv.findPosition(false, 0));
-		Assert.assertEquals(RankedBitVector.NOT_FOUND, bv.findPosition(true, 0));
-		Assert.assertEquals(0, bv.findPosition(true, 1));
-		Assert.assertEquals(1, bv.findPosition(true, 2));
-		Assert.assertEquals(2, bv.findPosition(false, 1));
-		Assert.assertEquals(3, bv.findPosition(true, 3));
-		Assert.assertEquals(4, bv.findPosition(false, 2));
-		Assert.assertEquals(5, bv.findPosition(false, 3));
-		Assert.assertEquals(6, bv.findPosition(false, 4));
-		Assert.assertEquals(7, bv.findPosition(true, 4));
-		Assert.assertEquals(RankedBitVector.NOT_FOUND,
+		assertEquals(RankedBitVector.NOT_FOUND, bv.findPosition(true, 0));
+		assertEquals(0, bv.findPosition(true, 1));
+		assertEquals(1, bv.findPosition(true, 2));
+		assertEquals(2, bv.findPosition(false, 1));
+		assertEquals(3, bv.findPosition(true, 3));
+		assertEquals(4, bv.findPosition(false, 2));
+		assertEquals(5, bv.findPosition(false, 3));
+		assertEquals(6, bv.findPosition(false, 4));
+		assertEquals(7, bv.findPosition(true, 4));
+		assertEquals(RankedBitVector.NOT_FOUND,
 				bv.findPosition(false, 5));
-		Assert.assertEquals(RankedBitVector.NOT_FOUND, bv.findPosition(true, 5));
+		assertEquals(RankedBitVector.NOT_FOUND, bv.findPosition(true, 5));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidInitialSizes0() {
-		new RankedBitVectorImpl(1, 0, 0x40);
+		assertThrows(IllegalArgumentException.class, () -> new RankedBitVectorImpl(1, 0, 0x40));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidInitialSizes1() {
-		new RankedBitVectorImpl(1, 2, 0x3F);
+		assertThrows(IllegalArgumentException.class, () -> new RankedBitVectorImpl(1, 2, 0x3F));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidInitialSizes2() {
-		new CountBitsArray(new BitVectorImpl(), 0);
+		assertThrows(IllegalArgumentException.class, () -> new CountBitsArray(new BitVectorImpl(), 0));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidInitialSizes3() {
-		new FindPositionArray(0, new BitVectorImpl(), true);
+		assertThrows(IllegalArgumentException.class, () -> new FindPositionArray(0, new BitVectorImpl(), true));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidInitialSizes4() {
-		new FindPositionArray(new BitVectorImpl(), true, 0x3F);
+		assertThrows(IllegalArgumentException.class, () -> new FindPositionArray(new BitVectorImpl(), true, 0x3F));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testInvalidInitialSizes5() {
-		new RankedBitVectorImpl(-1);
+		assertThrows(IllegalArgumentException.class, () -> new RankedBitVectorImpl(-1));
 	}
 
 	@Test
@@ -322,25 +327,25 @@ public class RankedBitVectorImplTest {
 		RankedBitVectorImpl bv = new RankedBitVectorImpl(new BitVectorImpl());
 		PseudorandomBooleanGenerator generator = new PseudorandomBooleanGenerator(
 				0x7531);
-		Assert.assertEquals(0, bv.size());
+		assertEquals(0, bv.size());
 		for (int i = 0; i < 0x300; i++) {
 			bv.addBit(generator.getPseudorandomBoolean());
 		}
 		Iterator<Boolean> it = bv.iterator();
 		for (int i = 0; i < 0x300; i++) {
 			boolean value = it.next();
-			Assert.assertEquals(bv.getBit(i), value);
+			assertEquals(bv.getBit(i), value);
 		}
-		Assert.assertFalse(it.hasNext());
+		assertFalse(it.hasNext());
 	}
 
 	@Test
 	public void testSize0() {
 		RankedBitVectorImpl bv = new RankedBitVectorImpl(0x100);
-		Assert.assertEquals(0x100, bv.size());
+		assertEquals(0x100, bv.size());
 		bv.addBit(false);
 		bv.addBit(true);
-		Assert.assertEquals(0x102, bv.size());
+		assertEquals(0x102, bv.size());
 		assertCorrectCount(bv);
 		assertCorrectFindPosition(bv);
 	}
@@ -348,10 +353,10 @@ public class RankedBitVectorImplTest {
 	@Test
 	public void testSize1() {
 		RankedBitVectorImpl bv = new RankedBitVectorImpl();
-		Assert.assertEquals(0, bv.size());
+		assertEquals(0, bv.size());
 		for (int i = 0; i < 0x300; i++) {
 			bv.addBit((i % 5) == 0);
-			Assert.assertEquals(i + 1, bv.size());
+			assertEquals(i + 1, bv.size());
 		}
 		assertCorrectCount(bv);
 		assertCorrectFindPosition(bv);
@@ -364,7 +369,7 @@ public class RankedBitVectorImplTest {
 			boolean value = (i % 3) == 0;
 			bv.addBit(value);
 		}
-		Assert.assertEquals("1001001001001001", bv.toString());
+		assertEquals("1001001001001001", bv.toString());
 		assertCorrectCount(bv);
 		assertCorrectFindPosition(bv);
 
@@ -372,21 +377,21 @@ public class RankedBitVectorImplTest {
 			boolean value = (i % 2) == 0;
 			bv.addBit(value);
 		}
-		Assert.assertEquals("10010010010010011010101010101010", bv.toString());
+		assertEquals("10010010010010011010101010101010", bv.toString());
 		assertCorrectCount(bv);
 		assertCorrectFindPosition(bv);
 
 		for (int i = 0; i < 0x20; i++) {
 			bv.setBit(i, bv.getBit(i));
 		}
-		Assert.assertEquals("10010010010010011010101010101010", bv.toString());
+		assertEquals("10010010010010011010101010101010", bv.toString());
 		assertCorrectCount(bv);
 		assertCorrectFindPosition(bv);
 
 		for (int i = 0; i < 0x20; i++) {
 			bv.setBit(i, !bv.getBit(i));
 		}
-		Assert.assertEquals("01101101101101100101010101010101", bv.toString());
+		assertEquals("01101101101101100101010101010101", bv.toString());
 		assertCorrectCount(bv);
 		assertCorrectFindPosition(bv);
 	}
@@ -404,13 +409,13 @@ public class RankedBitVectorImplTest {
 		bv.addBit(true);
 
 		CountBitsArray cba = new CountBitsArray(bv, 2);
-		Assert.assertEquals("[1, 3, 3, 4]", cba.toString());
+		assertEquals("[1, 3, 3, 4]", cba.toString());
 
 		FindPositionArray fpa = new FindPositionArray(2, bv, false);
-		Assert.assertEquals("[-1, 4, 6]", fpa.toString());
+		assertEquals("[-1, 4, 6]", fpa.toString());
 
-		Assert.assertEquals(RankedBitVector.NOT_FOUND, fpa.findPosition(0));
-		Assert.assertEquals(4, fpa.findPosition(2));
+		assertEquals(RankedBitVector.NOT_FOUND, fpa.findPosition(0));
+		assertEquals(4, fpa.findPosition(2));
 	}
 
 	@Test
diff --git a/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockDirectoryManagerTest.java b/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockDirectoryManagerTest.java
index 2974a257..8e75cae6 100644
--- a/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockDirectoryManagerTest.java
+++ b/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockDirectoryManagerTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.testing;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,6 +18,14 @@ package org.wikidata.wdtk.testing;
  * #L%
  */
 
+package org.wikidata.wdtk.testing;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.io.BufferedWriter;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -32,19 +38,17 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.HashSet;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.util.CompressionType;
 import org.wikidata.wdtk.util.DirectoryManager;
 
-import static org.junit.Assert.*;
-
 public class MockDirectoryManagerTest {
 
 	MockDirectoryManager mdm;
 	Path basePath;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws Exception {
 		basePath = Paths.get(System.getProperty("user.dir"));
 		mdm = new MockDirectoryManager(basePath, true, false);
@@ -65,10 +69,10 @@ public class MockDirectoryManagerTest {
 		assertTrue(mdm.hasSubdirectory("newdir"));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void subdirectoryManagerConflict() throws IOException {
 		DirectoryManager submdm = mdm.getSubdirectoryManager("dir2");
-		submdm.getSubdirectoryManager("test.txt");
+		assertThrows(IOException.class, () -> submdm.getSubdirectoryManager("test.txt"));
 	}
 
 	@Test
@@ -183,52 +187,52 @@ public class MockDirectoryManagerTest {
 		assertTrue(exception);
 	}
 
-	@Test(expected = FileAlreadyExistsException.class)
+	@Test
 	public void createFileConflict() throws IOException {
 		DirectoryManager submdm = mdm.getSubdirectoryManager("dir2");
-		submdm.createFile("test.txt", "New contents");
+		assertThrows(FileAlreadyExistsException.class, () -> submdm.createFile("test.txt", "New contents"));
 	}
 
-	@Test(expected = FileNotFoundException.class)
+	@Test
 	public void fileNotFound() throws IOException {
-		mdm.getInputStreamForFile("test.txt", CompressionType.NONE);
+		assertThrows(FileNotFoundException.class, () -> mdm.getInputStreamForFile("test.txt", CompressionType.NONE));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void createFileFromStringReadOnly() throws IOException {
 		DirectoryManager mdmReadOnly = new MockDirectoryManager(basePath,
 				false, true);
-		mdmReadOnly.createFile("newfile.txt", "New contents");
+		assertThrows(IOException.class, () -> mdmReadOnly.createFile("newfile.txt", "New contents"));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void createFileFromInputStreamReadOnly() throws IOException {
 		DirectoryManager mdmReadOnly = new MockDirectoryManager(basePath,
 				false, true);
-		mdmReadOnly.createFile("newfile.txt",
-				MockStringContentFactory.newMockInputStream("content"));
+		assertThrows(IOException.class, () -> mdmReadOnly.createFile("newfile.txt",
+				MockStringContentFactory.newMockInputStream("content")));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void createFileFromInputStreamAtomicReadOnly() throws IOException {
 		DirectoryManager mdmReadOnly = new MockDirectoryManager(basePath,
 				false, true);
-		mdmReadOnly.createFileAtomic("newfile.txt",
-				MockStringContentFactory.newMockInputStream("content"));
+		assertThrows(IOException.class, () -> mdmReadOnly.createFileAtomic("newfile.txt",
+				MockStringContentFactory.newMockInputStream("content")));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void getOutputStreamReadOnly() throws IOException {
 		DirectoryManager mdmReadOnly = new MockDirectoryManager(basePath,
 				false, true);
-		mdmReadOnly.getOutputStreamForFile("newfile.txt");
+		assertThrows(IOException.class, () -> mdmReadOnly.getOutputStreamForFile("newfile.txt"));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void openInNonexistingDirectoryReadOnly() throws IOException {
 		DirectoryManager mdmReadOnly = new MockDirectoryManager(basePath,
 				false, true);
-		mdmReadOnly.getSubdirectoryManager("doesNotExist");
+		assertThrows(IOException.class, () -> mdmReadOnly.getSubdirectoryManager("doesNotExist"));
 	}
 
 }
diff --git a/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockWebResourceFetcherTest.java b/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockWebResourceFetcherTest.java
index c3a4900e..b6f5a4ed 100644
--- a/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockWebResourceFetcherTest.java
+++ b/wdtk-testing/src/test/java/org/wikidata/wdtk/testing/MockWebResourceFetcherTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.testing;
-
 /*
  * #%L
  * Wikidata Toolkit Dump File Handling
@@ -20,20 +18,23 @@ package org.wikidata.wdtk.testing;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.testing;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public class MockWebResourceFetcherTest {
 
 	MockWebResourceFetcher mwrf;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws Exception {
 		mwrf = new MockWebResourceFetcher();
 		mwrf.setWebResourceContents("http://example.com/test.html",
@@ -73,9 +74,9 @@ public class MockWebResourceFetcherTest {
 		assertTrue(exception);
 	}
 
-	@Test(expected = IOException.class)
-	public void readOnlyMockedUrls() throws IOException {
-		mwrf.getInputStreamForUrl("http://not-mocked.com");
+	@Test
+	public void readOnlyMockedUrls() {
+		assertThrows(IOException.class, () -> mwrf.getInputStreamForUrl("http://not-mocked.com"));
 	}
 
 }
diff --git a/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerFactoryTest.java b/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerFactoryTest.java
index 8beee0ce..ba696fe1 100644
--- a/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerFactoryTest.java
+++ b/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerFactoryTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.util;
-
 /*
  * #%L
  * Wikidata Toolkit Utilities
@@ -20,8 +18,11 @@ package org.wikidata.wdtk.util;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.util;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -30,8 +31,8 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.List;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 public class DirectoryManagerFactoryTest {
 
@@ -83,7 +84,7 @@ public class DirectoryManagerFactoryTest {
 		}
 	}
 
-	@Before
+	@BeforeEach
 	public void setup() throws IOException {
 		DirectoryManagerFactory
 				.setDirectoryManagerClass(DirectoryManagerImpl.class);
@@ -111,17 +112,17 @@ public class DirectoryManagerFactoryTest {
 		assertEquals(path, dmi.directory);
 	}
 
-	@Test(expected = RuntimeException.class)
-	public void createDirectoryManagerNoConstructor() throws IOException {
+	@Test
+	public void createDirectoryManagerNoConstructor() {
 		DirectoryManagerFactory
 				.setDirectoryManagerClass(TestDirectoryManager.class);
-		DirectoryManagerFactory.createDirectoryManager("/", true);
+		assertThrows(RuntimeException.class, () -> DirectoryManagerFactory.createDirectoryManager("/", true));
 	}
 
-	@Test(expected = IOException.class)
-	public void createDirectoryManagerIoException() throws IOException {
-		DirectoryManagerFactory.createDirectoryManager(
-				"/nonexisting-directory/123456789/hopefully", true);
+	@Test
+	public void createDirectoryManagerIoException() {
+		assertThrows(IOException.class, () -> DirectoryManagerFactory.createDirectoryManager(
+				"/nonexisting-directory/123456789/hopefully", true));
 	}
 
 }
diff --git a/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerTest.java b/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerTest.java
index db753b15..8881833b 100644
--- a/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerTest.java
+++ b/wdtk-util/src/test/java/org/wikidata/wdtk/util/DirectoryManagerTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.util;
-
 /*
  * #%L
  * Wikidata Toolkit Utilities
@@ -20,7 +18,10 @@ package org.wikidata.wdtk.util;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.util;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
@@ -35,8 +36,8 @@ import java.nio.file.Paths;
 
 import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
 import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test for directory manager implementation. We can only test the read-only
@@ -49,7 +50,7 @@ public class DirectoryManagerTest {
 
 	DirectoryManagerImpl dm;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws Exception {
 		Path path = Paths.get(System.getProperty("user.dir"));
 		dm = new DirectoryManagerImpl(path, true);
@@ -61,33 +62,33 @@ public class DirectoryManagerTest {
 				dm.toString());
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void MissingSubdirectoryReadOnly() throws IOException {
-		dm.getSubdirectoryManager("1 2 3 not a subdirectory that exists in the test system, hopefully");
+		assertThrows(IOException.class, () -> dm.getSubdirectoryManager("1 2 3 not a subdirectory that exists in the test system, hopefully"));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void OutputStreamReadOnly() throws IOException {
-		dm.getOutputStreamForFile("file.txt");
+		assertThrows(IOException.class, () -> dm.getOutputStreamForFile("file.txt"));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void NoCreateFileStringReadOnly() throws IOException {
-		dm.createFile("new-test-file.txt", "new contents");
+		assertThrows(IOException.class, () -> dm.createFile("new-test-file.txt", "new contents"));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void NoCreateFileInputStreamReadOnly() throws IOException {
 		ByteArrayInputStream in = new ByteArrayInputStream(
 				"new contents".getBytes(StandardCharsets.UTF_8));
-		dm.createFile("new-test-file.txt", in);
+		assertThrows(IOException.class, () -> dm.createFile("new-test-file.txt", in));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void NoCreateFileAtomicInputStreamReadOnly() throws IOException {
 		ByteArrayInputStream in = new ByteArrayInputStream(
 				"new contents".getBytes(StandardCharsets.UTF_8));
-		dm.createFileAtomic("new-test-file.txt", in);
+		assertThrows(IOException.class, () -> dm.createFileAtomic("new-test-file.txt", in));
 	}
 
 	@Test
diff --git a/wdtk-util/src/test/java/org/wikidata/wdtk/util/NestedIteratorTest.java b/wdtk-util/src/test/java/org/wikidata/wdtk/util/NestedIteratorTest.java
index cfe1e98b..fb4e2318 100644
--- a/wdtk-util/src/test/java/org/wikidata/wdtk/util/NestedIteratorTest.java
+++ b/wdtk-util/src/test/java/org/wikidata/wdtk/util/NestedIteratorTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.util;
-
 /*
  * #%L
  * Wikidata Toolkit Utilities
@@ -20,14 +18,19 @@ package org.wikidata.wdtk.util;
  * #L%
  */
 
+package org.wikidata.wdtk.util;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.NoSuchElementException;
 
-import org.junit.Test;
-
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
 
 public class NestedIteratorTest {
 
@@ -62,25 +65,25 @@ public class NestedIteratorTest {
 		assertFalse(nestedIterator.hasNext());
 	}
 
-	@Test(expected = UnsupportedOperationException.class)
+	@Test
 	public void removeNotSupported() {
 		NestedIterator<String> nestedIterator = new NestedIterator<>(
 				Collections.singletonList(Collections.singletonList("Test")));
-		nestedIterator.remove();
+		assertThrows(UnsupportedOperationException.class, () -> nestedIterator.remove());
 	}
 
-	@Test(expected = NoSuchElementException.class)
+	@Test
 	public void iterateBeyondInnerList() {
 		NestedIterator<String> nestedIterator = new NestedIterator<>(
 				Collections.singletonList(Collections.emptyList()));
-		nestedIterator.next();
+		assertThrows(NoSuchElementException.class, () -> nestedIterator.next());
 	}
 
-	@Test(expected = NoSuchElementException.class)
+	@Test
 	public void iterateBeyondOuterList() {
 		NestedIterator<String> nestedIterator = new NestedIterator<>(
 				Collections.emptyList());
-		nestedIterator.next();
+		assertThrows(NoSuchElementException.class, () -> nestedIterator.next());
 	}
 
 }
diff --git a/wdtk-util/src/test/java/org/wikidata/wdtk/util/TimerTest.java b/wdtk-util/src/test/java/org/wikidata/wdtk/util/TimerTest.java
index 27b29f71..7271f27c 100644
--- a/wdtk-util/src/test/java/org/wikidata/wdtk/util/TimerTest.java
+++ b/wdtk-util/src/test/java/org/wikidata/wdtk/util/TimerTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.util;
-
 /*
  * #%L
  * Wikidata Toolkit utilities
@@ -20,13 +18,18 @@ package org.wikidata.wdtk.util;
  * #L%
  */
 
-import static org.junit.Assert.*;
+package org.wikidata.wdtk.util;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.lang.management.ManagementFactory;
 import java.lang.management.ThreadMXBean;
 import java.util.Random;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class TimerTest {
 
@@ -79,22 +82,22 @@ public class TimerTest {
 		long wallTime1 = System.nanoTime();
 		timer.start();
 		doDummyComputation();
-		assertTrue("Timer should be running", timer.isRunning());
+		assertTrue(timer.isRunning(), "Timer should be running");
 		timer.stop();
 		cpuTime1 = tmxb.getThreadCpuTime(threadId) - cpuTime1;
 		wallTime1 = System.nanoTime() - wallTime1;
 		assertTrue(
-				"Unrealistic CPU time: " + timer.getTotalCpuTime()
-						+ " should be closer to " + cpuTime1,
 				(cpuTime1 - TimerTest.TIME_TOLERANCE) <= timer
 						.getTotalCpuTime()
-						&& timer.getTotalCpuTime() <= cpuTime1);
+						&& timer.getTotalCpuTime() <= cpuTime1,
+				"Unrealistic CPU time: " + timer.getTotalCpuTime()
+						+ " should be closer to " + cpuTime1);
 		assertTrue(
-				"Unrealistic wall time: " + timer.getTotalWallTime()
-						+ " should be closer to " + wallTime1,
 				(wallTime1 - 2 * TimerTest.TIME_TOLERANCE) <= timer
 						.getTotalWallTime()
-						&& timer.getTotalWallTime() <= wallTime1);
+						&& timer.getTotalWallTime() <= wallTime1,
+				"Unrealistic wall time: " + timer.getTotalWallTime()
+						+ " should be closer to " + wallTime1);
 
 		long cpuTime2 = tmxb.getThreadCpuTime(threadId);
 		long wallTime2 = System.nanoTime();
@@ -104,17 +107,17 @@ public class TimerTest {
 		cpuTime1 += tmxb.getThreadCpuTime(threadId) - cpuTime2;
 		wallTime1 += System.nanoTime() - wallTime2;
 		assertTrue(
-				"Unrealistic total CPU time: " + timer.getTotalCpuTime()
-						+ " should be closer to " + cpuTime1,
 				(cpuTime1 - 2 * TimerTest.TIME_TOLERANCE) <= timer
 						.getTotalCpuTime()
-						&& timer.getTotalCpuTime() <= cpuTime1);
+						&& timer.getTotalCpuTime() <= cpuTime1,
+				"Unrealistic total CPU time: " + timer.getTotalCpuTime()
+						+ " should be closer to " + cpuTime1);
 		assertTrue(
-				"Unrealistic total wall time: " + timer.getTotalWallTime()
-						+ " should be closer to " + wallTime1,
 				(wallTime1 - 4 * TimerTest.TIME_TOLERANCE) <= timer
 						.getTotalWallTime()
-						&& timer.getTotalWallTime() <= wallTime1);
+						&& timer.getTotalWallTime() <= wallTime1,
+				"Unrealistic total wall time: " + timer.getTotalWallTime()
+						+ " should be closer to " + wallTime1);
 
 		assertEquals(timer.getTotalCpuTime() / 2, timer.getAvgCpuTime());
 		assertEquals(timer.getTotalWallTime() / 2, timer.getAvgWallTime());
@@ -122,7 +125,7 @@ public class TimerTest {
 		timer.reset();
 		assertEquals(timer.getTotalCpuTime(), 0);
 		assertEquals(timer.getTotalWallTime(), 0);
-		assertFalse("Timer should not be running", timer.isRunning());
+		assertFalse(timer.isRunning(), "Timer should not be running");
 	}
 
 	@Test
@@ -163,22 +166,22 @@ public class TimerTest {
 		Timer.stopNamedTimer("test timer", Timer.RECORD_WALLTIME);
 		Timer.stopNamedTimer("test timer", Timer.RECORD_ALL, 0);
 
-		assertTrue("Named timer should have measured a non-zero CPU time.",
-				timerA1.getTotalCpuTime() > 0);
-		assertTrue("Named timer should have measured a non-zero wall time.",
-				timerA1.getTotalWallTime() > 0);
+		assertTrue(timerA1.getTotalCpuTime() > 0,
+				"Named timer should have measured a non-zero CPU time.");
+		assertTrue(timerA1.getTotalWallTime() > 0,
+				"Named timer should have measured a non-zero wall time.");
 		assertTrue(
-				"Timer for CPU time should have measured a non-zero CPU time.",
-				timerCpu.getTotalCpuTime() > 0);
-		assertEquals("Timer for CPU time should not have measured a wall time.", 0, timerCpu.getTotalWallTime());
-		assertEquals("Timer for wall time should not have measured a CPU time.", 0, timerWall.getTotalCpuTime());
+				timerCpu.getTotalCpuTime() > 0,
+				"Timer for CPU time should have measured a non-zero CPU time.");
+		assertEquals(0, timerCpu.getTotalWallTime(), "Timer for CPU time should not have measured a wall time.");
+		assertEquals(0, timerWall.getTotalCpuTime(), "Timer for wall time should not have measured a CPU time.");
 		assertTrue(
-				"Timer for wall time should have measured a non-zero wall time.",
-				timerWall.getTotalWallTime() > 0);
-		assertEquals("Timer without threadId should not have measured a CPU time.", 0, timerNoThread.getTotalCpuTime());
+				timerWall.getTotalWallTime() > 0,
+				"Timer for wall time should have measured a non-zero wall time.");
+		assertEquals(0, timerNoThread.getTotalCpuTime(), "Timer without threadId should not have measured a CPU time.");
 		assertTrue(
-				"Timer without threadId should have measured a non-zero wall time.",
-				timerNoThread.getTotalWallTime() > 0);
+				timerNoThread.getTotalWallTime() > 0,
+				"Timer without threadId should have measured a non-zero wall time.");
 
 		// Testing total timer creation:
 		Timer totalTimer1 = Timer.getNamedTotalTimer("test timer");
@@ -220,14 +223,14 @@ public class TimerTest {
 		Timer.resetNamedTimer("test timer", Timer.RECORD_WALLTIME);
 		Timer.resetNamedTimer("test timer", Timer.RECORD_ALL, 0);
 
-		assertEquals("Named timer should have reset CPU time.", 0, timerA1.getTotalCpuTime());
-		assertEquals("Named timer should have reset wall time.", 0, timerA1.getTotalWallTime());
-		assertEquals("Timer for CPU time should have reset CPU time.", 0, timerCpu.getTotalCpuTime());
-		assertEquals("Timer for CPU time should have reset wall time.", 0, timerCpu.getTotalWallTime());
-		assertEquals("Timer for wall time should have reset CPU time.", 0, timerWall.getTotalCpuTime());
-		assertEquals("Timer for wall time should have reset wall time.", 0, timerWall.getTotalWallTime());
-		assertEquals("Timer without threadId should have reset CPU time.", 0, timerNoThread.getTotalCpuTime());
-		assertEquals("Timer without threadId should have reset wall time.", 0, timerNoThread.getTotalWallTime());
+		assertEquals(0, timerA1.getTotalCpuTime(), "Named timer should have reset CPU time.");
+		assertEquals(0, timerA1.getTotalWallTime(), "Named timer should have reset wall time.");
+		assertEquals(0, timerCpu.getTotalCpuTime(), "Timer for CPU time should have reset CPU time.");
+		assertEquals(0, timerCpu.getTotalWallTime(), "Timer for CPU time should have reset wall time.");
+		assertEquals(0, timerWall.getTotalCpuTime(), "Timer for wall time should have reset CPU time.");
+		assertEquals(0, timerWall.getTotalWallTime(), "Timer for wall time should have reset wall time.");
+		assertEquals(0, timerNoThread.getTotalCpuTime(), "Timer without threadId should have reset CPU time.");
+		assertEquals(0, timerNoThread.getTotalWallTime(), "Timer without threadId should have reset wall time.");
 
 		// Testing unregistered timer stop (does not create one):
 		assertEquals(Timer.stopNamedTimer("unknown name"), -1);
@@ -261,7 +264,7 @@ public class TimerTest {
 		doDummyComputation();
 		timer.stop();
 
-		assertTrue("Timer should have measured a CPU time.",
-				timer.getTotalCpuTime() > 0);
+		assertTrue(timer.getTotalCpuTime() > 0,
+				"Timer should have measured a CPU time.");
 	}
 }
diff --git a/wdtk-util/src/test/java/org/wikidata/wdtk/util/WebResourceFetcherTest.java b/wdtk-util/src/test/java/org/wikidata/wdtk/util/WebResourceFetcherTest.java
index 0232a387..245b60eb 100644
--- a/wdtk-util/src/test/java/org/wikidata/wdtk/util/WebResourceFetcherTest.java
+++ b/wdtk-util/src/test/java/org/wikidata/wdtk/util/WebResourceFetcherTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.util;
-
 /*
  * #%L
  * Wikidata Toolkit Utilities
@@ -20,20 +18,22 @@ package org.wikidata.wdtk.util;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.util;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.net.InetSocketAddress;
 import java.net.Proxy;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class WebResourceFetcherTest {
 
 	@Test
 	public void testSetUserAgent() {
 		WebResourceFetcherImpl.setUserAgent("My user agent");
-		assertEquals("My user agent", WebResourceFetcherImpl.getUserAgent());
+		assertEquals(WebResourceFetcherImpl.getUserAgent(), "My user agent");
 	}
 
 	@Test
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnectionTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnectionTest.java
index d977d6e6..d90b6a99 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnectionTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnectionTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,20 +18,32 @@ package org.wikidata.wdtk.wikibaseapi;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.wikibaseapi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.net.HttpCookie;
 import java.net.URL;
-import java.util.*;
-
-import okhttp3.mockwebserver.Dispatcher;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import okhttp3.mockwebserver.RecordedRequest;
-import org.junit.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.testing.MockStringContentFactory;
 import org.wikidata.wdtk.wikibaseapi.apierrors.AssertUserFailedException;
 import org.wikidata.wdtk.wikibaseapi.apierrors.MaxlagErrorException;
@@ -42,7 +52,10 @@ import org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
-import static org.junit.Assert.*;
+import mockwebserver3.Dispatcher;
+import mockwebserver3.MockResponse;
+import mockwebserver3.MockWebServer;
+import mockwebserver3.RecordedRequest;
 
 public class BasicApiConnectionTest {
 
@@ -72,7 +85,7 @@ public class BasicApiConnectionTest {
 				.setBody(body);
 	}
 
-	@BeforeClass
+	@BeforeAll
 	public static void init() throws Exception {
 		Dispatcher dispatcher = new Dispatcher() {
 
@@ -110,12 +123,12 @@ public class BasicApiConnectionTest {
 		server.start();
 	}
 
-	@AfterClass
+	@AfterAll
 	public static void finish() throws IOException {
 		server.shutdown();
 	}
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		connection = new BasicApiConnection(server.url("/w/api.php").toString());
 	}
@@ -191,10 +204,10 @@ public class BasicApiConnectionTest {
 		assertFalse(connection.loggedIn);
 	}
 
-	@Test(expected = LoginFailedException.class)
+	@Test
 	public void loginUserErrors() throws LoginFailedException {
 		// This will fail because the user is not known
-		connection.login("username1", "password1");
+		assertThrows(LoginFailedException.class, () -> connection.login("username1", "password1"));
 	}
 
 	@Test
@@ -225,13 +238,13 @@ public class BasicApiConnectionTest {
 		assertEquals(expectedWarnings, warnings);
 	}
 
-	@Test(expected = MediaWikiApiErrorException.class)
+	@Test
 	public void testErrors() throws IOException,
 			MediaWikiApiErrorException {
 		JsonNode root;
 		URL path = this.getClass().getResource("/error.json");
 		root = mapper.readTree(path.openStream());
-		connection.checkErrors(root);
+		assertThrows(MediaWikiApiErrorException.class, () -> connection.checkErrors(root));
 	}
 	
 	@Test
@@ -295,13 +308,13 @@ public class BasicApiConnectionTest {
 		}
 	}
 
-	@Test(expected = AssertUserFailedException.class)
+	@Test
 	public void testCheckCredentials() throws IOException, MediaWikiApiErrorException, LoginFailedException {
 		// we first login successfully
 		connection.login("username", "password");
 		assertTrue(connection.isLoggedIn());
 		// after a while, the credentials expire
-		connection.checkCredentials();
+		assertThrows(AssertUserFailedException.class, () -> connection.checkCredentials());
 	}
 
 	/**
@@ -347,8 +360,8 @@ public class BasicApiConnectionTest {
 		assertEquals("{\"entities\":{\"Q8\":{\"pageid\":134,\"ns\":0,\"title\":\"Q8\",\"lastrevid\":1174289176,\"modified\":\"2020-05-05T12:39:07Z\",\"type\":\"item\",\"id\":\"Q8\"}},\"success\":1}", mapper.writeValueAsString(root));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testUnsupportedMethod() throws IOException, MediaWikiApiErrorException {
-		connection.sendJsonRequest("PUT", new HashMap<>());
+		assertThrows(IllegalArgumentException.class, () -> connection.sendJsonRequest("PUT", new HashMap<>()));
 	}
 }
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/OAuthApiConnectionTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/OAuthApiConnectionTest.java
index ee5e67a5..05e37e75 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/OAuthApiConnectionTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/OAuthApiConnectionTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,26 +18,33 @@ package org.wikidata.wdtk.wikibaseapi;
  * #L%
  */
 
+package org.wikidata.wdtk.wikibaseapi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import okhttp3.mockwebserver.Dispatcher;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import okhttp3.mockwebserver.RecordedRequest;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import java.io.IOException;
+import java.util.Collections;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.interfaces.EntityDocument;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
 import org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException;
 
-import java.io.IOException;
-import java.util.Collections;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
-import static org.junit.Assert.*;
+import mockwebserver3.Dispatcher;
+import mockwebserver3.MockResponse;
+import mockwebserver3.MockWebServer;
+import mockwebserver3.RecordedRequest;
 
 public class OAuthApiConnectionTest {
 
@@ -74,7 +79,7 @@ public class OAuthApiConnectionTest {
             "\"connectTimeout\":-1," +
             "\"readTimeout\":-1}";
 
-    @BeforeClass
+    @BeforeAll
     public static void init() throws IOException {
         Dispatcher dispatcher = new Dispatcher() {
 
@@ -100,12 +105,12 @@ public class OAuthApiConnectionTest {
         server.start();
     }
 
-    @AfterClass
+    @AfterAll
     public static void finish() throws IOException {
         server.shutdown();
     }
 
-    @Before
+    @BeforeEach
     public void setUp() {
         connection = new OAuthApiConnection(server.url("/w/api.php").toString(),
                 CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_SECRET);
@@ -155,10 +160,10 @@ public class OAuthApiConnectionTest {
     public void testDeserialize() throws IOException {
         OAuthApiConnection newConnection = mapper.readValue(LOGGED_IN_SERIALIZED, OAuthApiConnection.class);
         assertTrue(newConnection.isLoggedIn());
-        assertEquals(CONSUMER_KEY, newConnection.getConsumerKey());
-        assertEquals(CONSUMER_SECRET, newConnection.getConsumerSecret());
-        assertEquals(ACCESS_TOKEN, newConnection.getAccessToken());
-        assertEquals(ACCESS_SECRET, newConnection.getAccessSecret());
+        assertEquals(newConnection.getConsumerKey(), CONSUMER_KEY);
+        assertEquals(newConnection.getConsumerSecret(), CONSUMER_SECRET);
+        assertEquals(newConnection.getAccessToken(), ACCESS_TOKEN);
+        assertEquals(newConnection.getAccessSecret(), ACCESS_SECRET);
         assertEquals(server.url("/w/api.php").toString(), newConnection.getApiBaseUrl());
         assertEquals("foo", newConnection.getCurrentUser());
         assertEquals(-1, connection.getConnectTimeout());
@@ -170,10 +175,10 @@ public class OAuthApiConnectionTest {
     public void testDeserializeNotLogin() throws IOException {
         OAuthApiConnection connection = mapper.readValue(NOT_LOGGED_IN_SERIALIZED, OAuthApiConnection.class);
         assertFalse(connection.isLoggedIn());
-        assertNull(CONSUMER_KEY, connection.getConsumerKey());
-        assertNull(CONSUMER_SECRET, connection.getConsumerSecret());
-        assertNull(ACCESS_TOKEN, connection.getAccessToken());
-        assertNull(ACCESS_SECRET, connection.getAccessSecret());
+        assertNull(connection.getConsumerKey(), CONSUMER_KEY);
+        assertNull(connection.getConsumerSecret(), CONSUMER_SECRET);
+        assertNull(connection.getAccessToken(), ACCESS_TOKEN);
+        assertNull(connection.getAccessSecret(), ACCESS_SECRET);
         assertEquals(server.url("/w/api.php").toString(), connection.getApiBaseUrl());
         assertEquals(-1, connection.getConnectTimeout());
         assertEquals(-1, connection.getReadTimeout());
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/StatementUpdateTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/StatementUpdateTest.java
index 72d6e441..3f9a56a5 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/StatementUpdateTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/StatementUpdateTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,21 +18,23 @@ package org.wikidata.wdtk.wikibaseapi;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.wikibaseapi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.ItemDocumentBuilder;
+import org.wikidata.wdtk.datamodel.helpers.JsonSerializer;
 import org.wikidata.wdtk.datamodel.helpers.ReferenceBuilder;
 import org.wikidata.wdtk.datamodel.helpers.StatementBuilder;
-import org.wikidata.wdtk.datamodel.helpers.JsonSerializer;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
 import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
 import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/TermStatementUpdateTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/TermStatementUpdateTest.java
index 283e2051..7c3d0d82 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/TermStatementUpdateTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/TermStatementUpdateTest.java
@@ -20,15 +20,15 @@
 
 package org.wikidata.wdtk.wikibaseapi;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.ItemDocumentBuilder;
 import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbEditingActionTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbEditingActionTest.java
index cc90e197..88373ca6 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbEditingActionTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbEditingActionTest.java
@@ -1,7 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
-import static org.junit.Assert.assertEquals;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -22,15 +18,17 @@ import static org.junit.Assert.assertEquals;
  * #L%
  */
 
-import static org.junit.Assert.assertNull;
+package org.wikidata.wdtk.wikibaseapi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
-import org.wikidata.wdtk.datamodel.interfaces.EntityDocument;
 import org.wikidata.wdtk.util.CompressionType;
 import org.wikidata.wdtk.wikibaseapi.apierrors.MaxlagErrorException;
 import org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException;
@@ -38,19 +36,18 @@ import org.wikidata.wdtk.wikibaseapi.apierrors.TokenErrorException;
 
 public class WbEditingActionTest {
 
-	@Test(expected = IOException.class)
+	@Test
 	public void testOffineErrors() throws IOException,
 			MediaWikiApiErrorException {
 		MockBasicApiConnection con = new MockBasicApiConnection();
 		WbEditingAction weea = new WbEditingAction(con,
 				Datamodel.SITE_WIKIDATA);
 
-		EntityDocument result = weea.wbEditEntity("Q42", null, null, null,
-				"{}", true, false, 0, null, null);
-		assertNull(result);
+		assertThrows(IOException.class, () -> weea.wbEditEntity("Q42", null, null, null,
+				"{}", true, false, 0, null, null));
 	}
 
-	@Test(expected = TokenErrorException.class)
+	@Test
 	public void testApiErrorGettingToken() throws IOException,
 			MediaWikiApiErrorException {
 		MockBasicApiConnection con = new MockBasicApiConnection();
@@ -76,10 +73,10 @@ public class WbEditingActionTest {
 
 		WbEditingAction weea = new WbEditingAction(con,
 				Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null);
+		assertThrows(TokenErrorException.class, () -> weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null));
 	}
 
-	@Test(expected = TokenErrorException.class)
+	@Test
 	public void testNoTokenInReponse() throws IOException,
 			MediaWikiApiErrorException {
 		MockBasicApiConnection con = new MockBasicApiConnection();
@@ -105,10 +102,10 @@ public class WbEditingActionTest {
 		WbEditingAction weea = new WbEditingAction(con,
 				Datamodel.SITE_WIKIDATA);
 
-		weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null);
+		assertThrows(TokenErrorException.class, () -> weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null));
 	}
 
-	@Test(expected = MaxlagErrorException.class)
+	@Test
 	public void testApiErrorMaxLag() throws IOException,
 			MediaWikiApiErrorException {
 		MockBasicApiConnection con = new MockBasicApiConnection();
@@ -134,64 +131,64 @@ public class WbEditingActionTest {
 		WbEditingAction weea = new WbEditingAction(con,
 				Datamodel.SITE_WIKIDATA);
 		weea.setMaxLagFirstWaitTime(0); // speed up the test ...
-		weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null);
+		assertThrows(MaxlagErrorException.class, () -> weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testIdAndSite() throws IOException, MediaWikiApiErrorException {
 		WbEditingAction weea = new WbEditingAction(
 				new MockBasicApiConnection(), Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity("Q1234", "enwiki", null, null, "{}", false, false, 0,
-				null, null);
+		assertThrows(IllegalArgumentException.class, () -> weea.wbEditEntity("Q1234", "enwiki", null, null, "{}", false, false, 0,
+				null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testIdAndTitle() throws IOException, MediaWikiApiErrorException {
 		WbEditingAction weea = new WbEditingAction(
 				new MockBasicApiConnection(), Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity("Q1234", null, "Title", null, "{}", false, false, 0,
-				null, null);
+		assertThrows(IllegalArgumentException.class, () -> weea.wbEditEntity("Q1234", null, "Title", null, "{}", false, false, 0,
+				null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testTitleNoSite() throws IOException,
 			MediaWikiApiErrorException {
 		WbEditingAction weea = new WbEditingAction(
 				new MockBasicApiConnection(), Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity(null, null, "Title", null, "{}", false, false, 0,
-				null, null);
+		assertThrows(IllegalArgumentException.class, () -> weea.wbEditEntity(null, null, "Title", null, "{}", false, false, 0,
+				null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testNewAndId() throws IOException, MediaWikiApiErrorException {
 		WbEditingAction weea = new WbEditingAction(
 				new MockBasicApiConnection(), Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity("Q1234", null, null, "item", "{}", false, false, 0,
-				null, null);
+		assertThrows(IllegalArgumentException.class, () -> weea.wbEditEntity("Q1234", null, null, "item", "{}", false, false, 0,
+				null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testNewAndSite() throws IOException, MediaWikiApiErrorException {
 		WbEditingAction weea = new WbEditingAction(
 				new MockBasicApiConnection(), Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity(null, "enwiki", null, "item", "{}", false, false, 0,
-				null, null);
+		assertThrows(IllegalArgumentException.class, () -> weea.wbEditEntity(null, "enwiki", null, "item", "{}", false, false, 0,
+				null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testNewAndTitle() throws IOException,
 			MediaWikiApiErrorException {
 		WbEditingAction weea = new WbEditingAction(
 				new MockBasicApiConnection(), Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity(null, null, "Title", "item", "{}", false, false, 0,
-				null, null);
+		assertThrows(IllegalArgumentException.class, () -> weea.wbEditEntity(null, null, "Title", "item", "{}", false, false, 0,
+				null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testNoTask() throws IOException, MediaWikiApiErrorException {
 		WbEditingAction weea = new WbEditingAction(
 				new MockBasicApiConnection(), Datamodel.SITE_WIKIDATA);
-		weea.wbEditEntity(null, null, null, null, "{}", false, false, 0, null, null);
+		assertThrows(IllegalArgumentException.class, () -> weea.wbEditEntity(null, null, null, null, "{}", false, false, 0, null, null));
 	}
 	
 	@Test
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesActionTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesActionTest.java
index b8d21b5a..1a1dcd63 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesActionTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbGetEntitiesActionTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,15 +18,18 @@ package org.wikidata.wdtk.wikibaseapi;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.wikibaseapi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.interfaces.EntityDocument;
 import org.wikidata.wdtk.util.CompressionType;
@@ -39,7 +40,7 @@ public class WbGetEntitiesActionTest {
 	MockBasicApiConnection con;
 	WbGetEntitiesAction action;
 
-	@Before
+	@BeforeEach
 	public void setUp() throws Exception {
 
 		this.con = new MockBasicApiConnection();
@@ -115,31 +116,31 @@ public class WbGetEntitiesActionTest {
 		assertEquals(result1, result2);
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void testWbGetEntitiesIoError() throws MediaWikiApiErrorException, IOException {
 		WbGetEntitiesActionData properties = new WbGetEntitiesActionData();
 		properties.ids = "Q6|Q42|notmocked";
-		action.wbGetEntities(properties);
+		assertThrows(IOException.class, () -> action.wbGetEntities(properties));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testIdsAndTitles() throws MediaWikiApiErrorException, IOException {
-		action.wbGetEntities("Q42", null, "Tim Berners Lee", null, null, null);
+		assertThrows(IllegalArgumentException.class, () -> action.wbGetEntities("Q42", null, "Tim Berners Lee", null, null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testIdsAndSites() throws MediaWikiApiErrorException, IOException {
-		action.wbGetEntities("Q42", "enwiki", null, null, null, null);
+		assertThrows(IllegalArgumentException.class, () -> action.wbGetEntities("Q42", "enwiki", null, null, null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testTitlesNoSites() throws MediaWikiApiErrorException, IOException {
-		action.wbGetEntities(null, null, "Tim Berners Lee", null, null, null);
+		assertThrows(IllegalArgumentException.class, () -> action.wbGetEntities(null, null, "Tim Berners Lee", null, null, null));
 	}
 
-	@Test(expected = IllegalArgumentException.class)
+	@Test
 	public void testNoTitlesOrIds() throws MediaWikiApiErrorException, IOException {
-		action.wbGetEntities(null, "enwiki", null, null, null, null);
+		assertThrows(IllegalArgumentException.class, () -> action.wbGetEntities(null, "enwiki", null, null, null, null));
 	}
 
 }
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java
index 6ceb00d8..899541e9 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbSearchEntitiesActionTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,8 +18,11 @@ package org.wikidata.wdtk.wikibaseapi;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+package org.wikidata.wdtk.wikibaseapi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -29,8 +30,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.util.CompressionType;
 import org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException;
@@ -40,7 +41,7 @@ public class WbSearchEntitiesActionTest {
     MockBasicApiConnection con;
     WbSearchEntitiesAction action;
 
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
 
         this.con = new MockBasicApiConnection();
@@ -94,13 +95,13 @@ public class WbSearchEntitiesActionTest {
         assertTrue(results.isEmpty());
     }
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void testIdsAndTitles() throws MediaWikiApiErrorException, IOException {
-        action.wbSearchEntities(null, "en", null, null, null, null);
+        assertThrows(IllegalArgumentException.class, () -> action.wbSearchEntities(null, "en", null, null, null, null));
     }
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void testIdsAndSites() throws MediaWikiApiErrorException, IOException {
-        action.wbSearchEntities("abc", null, null, null, null, null);
+        assertThrows(IllegalArgumentException.class, () -> action.wbSearchEntities("abc", null, null, null, null, null));
     }
 }
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataEditorTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataEditorTest.java
index 11fd91c9..1a2e3cd4 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataEditorTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataEditorTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,6 +18,13 @@ package org.wikidata.wdtk.wikibaseapi;
  * #L%
  */
 
+package org.wikidata.wdtk.wikibaseapi;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collections;
@@ -27,28 +32,34 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.helpers.ItemDocumentBuilder;
+import org.wikidata.wdtk.datamodel.helpers.JsonSerializer;
 import org.wikidata.wdtk.datamodel.helpers.PropertyDocumentBuilder;
 import org.wikidata.wdtk.datamodel.helpers.StatementBuilder;
-import org.wikidata.wdtk.datamodel.helpers.JsonSerializer;
-import org.wikidata.wdtk.datamodel.interfaces.*;
+import org.wikidata.wdtk.datamodel.interfaces.DatatypeIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
+import org.wikidata.wdtk.datamodel.interfaces.ItemIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MediaInfoDocument;
+import org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
+import org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue;
+import org.wikidata.wdtk.datamodel.interfaces.Statement;
 import org.wikidata.wdtk.util.CompressionType;
 import org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException;
 import org.wikidata.wdtk.wikibaseapi.apierrors.TagsApplyNotAllowedException;
 import org.wikidata.wdtk.wikibaseapi.apierrors.TokenErrorException;
 
-import static org.junit.Assert.*;
-
 public class WikibaseDataEditorTest {
 
 	MockBasicApiConnection con;
 	ItemIdValue Q5 = Datamodel.makeWikidataItemIdValue("Q5");
 	PropertyIdValue P31 = Datamodel.makeWikidataPropertyIdValue("P31");
 
-	@Before
+	@BeforeEach
 	public void setUp() throws IOException {
 		this.con = new MockBasicApiConnection();
 		Map<String, String> params = new HashMap<>();
@@ -189,7 +200,7 @@ public class WikibaseDataEditorTest {
 		assertEquals(-1, wde.getRemainingEdits());
 	}
 
-	@Test(expected = TokenErrorException.class)
+	@Test
 	public void testCreateItemBadToken() throws IOException,
 			MediaWikiApiErrorException {
 		WikibaseDataEditor wde = new WikibaseDataEditor(this.con,
@@ -210,7 +221,7 @@ public class WikibaseDataEditorTest {
 		this.con.setWebResourceFromPath(params, this.getClass(),
 				"/error-badtoken.json", CompressionType.NONE);
 
-		wde.createItemDocument(itemDocument, "My summary", null);
+		assertThrows(TokenErrorException.class, () -> wde.createItemDocument(itemDocument, "My summary", null));
 	}
 
 	@Test
@@ -281,7 +292,7 @@ public class WikibaseDataEditorTest {
 		assertEquals(expectedResultDocument, result);
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void testCreateItemBadEntityDocumentJson() throws IOException,
 			MediaWikiApiErrorException {
 		// Test what happens if the API returns JSON without an actual entity
@@ -304,10 +315,10 @@ public class WikibaseDataEditorTest {
 		params.put("data", data);
 		con.setWebResource(params, expectedResult);
 
-		wde.createItemDocument(itemDocument, "My summary", null);
+		assertThrows(IOException.class, () -> wde.createItemDocument(itemDocument, "My summary", null));
 	}
 
-	@Test(expected = IOException.class)
+	@Test
 	public void testCreateItemMissingEntityDocumentJson() throws IOException,
 			MediaWikiApiErrorException {
 		WikibaseDataEditor wde = new WikibaseDataEditor(this.con,
@@ -328,7 +339,7 @@ public class WikibaseDataEditorTest {
 		params.put("data", data);
 		con.setWebResource(params, expectedResult);
 
-		wde.createItemDocument(itemDocument, "My summary", null);
+		assertThrows(IOException.class, () -> wde.createItemDocument(itemDocument, "My summary", null));
 	}
 
 	@Test
@@ -784,7 +795,7 @@ public class WikibaseDataEditorTest {
 		assertEquals(expectedResultDocument, result);
 	}
 	
-	@Test(expected = TagsApplyNotAllowedException.class)
+	@Test
 	public void testApplyInvalidTag() throws MediaWikiApiErrorException, IOException {
 		WikibaseDataEditor wde = new WikibaseDataEditor(this.con,
 				Datamodel.SITE_WIKIDATA);
@@ -815,10 +826,10 @@ public class WikibaseDataEditorTest {
 				+ "\"servedby\":\"mw1276\"}";
 		con.setWebResource(params, expectedResult);
 
-		wde.updateTermsStatements(itemDocument, Collections.<MonolingualTextValue>emptyList(),
+		assertThrows(TagsApplyNotAllowedException.class, () -> wde.updateTermsStatements(itemDocument, Collections.<MonolingualTextValue>emptyList(),
 				Collections.singletonList(description),	Collections.<MonolingualTextValue>emptyList(),
 				Collections.<MonolingualTextValue>emptyList(), Collections.<Statement>emptyList(),
-				Collections.<Statement>emptyList(), "testing tags", Collections.singletonList("tag_which_does_not_exist"));
+				Collections.<Statement>emptyList(), "testing tags", Collections.singletonList("tag_which_does_not_exist")));
 	}
 
 }
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataFetcherTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataFetcherTest.java
index 87097117..fd8039a5 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataFetcherTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WikibaseDataFetcherTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,11 +18,25 @@ package org.wikidata.wdtk.wikibaseapi;
  * #L%
  */
 
-import java.io.IOException;
-import java.util.*;
+package org.wikidata.wdtk.wikibaseapi;
 
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.wikidata.wdtk.datamodel.helpers.Datamodel;
 import org.wikidata.wdtk.datamodel.interfaces.EntityDocument;
 import org.wikidata.wdtk.datamodel.interfaces.MediaInfoIdValue;
@@ -32,14 +44,12 @@ import org.wikidata.wdtk.util.CompressionType;
 import org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException;
 import org.wikidata.wdtk.wikibaseapi.apierrors.NoSuchEntityErrorException;
 
-import static org.junit.Assert.*;
-
 public class WikibaseDataFetcherTest {
 
 	MockBasicApiConnection con;
 	WikibaseDataFetcher wdf;
 
-	@Before
+	@BeforeEach
 	public void setUp() {
 		con = new MockBasicApiConnection();
 		wdf = new WikibaseDataFetcher(con, Datamodel.SITE_WIKIDATA);
@@ -92,7 +102,7 @@ public class WikibaseDataFetcherTest {
 		assertNull(result);
 	}
 
-	@Test(expected = NoSuchEntityErrorException.class)
+	@Test
 	public void testWbGetEntitiesError() throws IOException,
 			MediaWikiApiErrorException {
 		Map<String, String> parameters = new HashMap<>();
@@ -101,7 +111,7 @@ public class WikibaseDataFetcherTest {
 		// We use the mock answer as for a multi request; no problem
 		con.setWebResourceFromPath(parameters, getClass(),
 				"/wbgetentities-bogus.json", CompressionType.NONE);
-		wdf.getEntityDocuments("bogus");
+		assertThrows(NoSuchEntityErrorException.class, () -> wdf.getEntityDocuments("bogus"));
 	}
 
 	@Test
diff --git a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/apierrors/MediaWikiApiErrorHandlerTest.java b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/apierrors/MediaWikiApiErrorHandlerTest.java
index 90096911..2b12906b 100644
--- a/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/apierrors/MediaWikiApiErrorHandlerTest.java
+++ b/wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/apierrors/MediaWikiApiErrorHandlerTest.java
@@ -1,5 +1,3 @@
-package org.wikidata.wdtk.wikibaseapi.apierrors;
-
 /*
  * #%L
  * Wikidata Toolkit Wikibase API
@@ -20,9 +18,12 @@ package org.wikidata.wdtk.wikibaseapi.apierrors;
  * #L%
  */
 
-import static org.junit.Assert.assertEquals;
+package org.wikidata.wdtk.wikibaseapi.apierrors;
 
-import org.junit.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.junit.jupiter.api.Test;
 
 public class MediaWikiApiErrorHandlerTest {
 
@@ -42,35 +43,35 @@ public class MediaWikiApiErrorHandlerTest {
 		assertEquals("some message", message);
 	}
 
-	@Test(expected = TokenErrorException.class)
+	@Test
 	public void testNoTokenError() throws MediaWikiApiErrorException {
-		MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
-				MediaWikiApiErrorHandler.ERROR_NO_TOKEN, "some message");
+		assertThrows(TokenErrorException.class, () -> MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
+				MediaWikiApiErrorHandler.ERROR_NO_TOKEN, "some message"));
 	}
 
-	@Test(expected = TokenErrorException.class)
+	@Test
 	public void testBadTokenError() throws MediaWikiApiErrorException {
-		MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
-				MediaWikiApiErrorHandler.ERROR_INVALID_TOKEN, "some message");
+		assertThrows(TokenErrorException.class, () -> MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
+				MediaWikiApiErrorHandler.ERROR_INVALID_TOKEN, "some message"));
 	}
 
-	@Test(expected = EditConflictErrorException.class)
+	@Test
 	public void testEditConflictError() throws MediaWikiApiErrorException {
-		MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
-				MediaWikiApiErrorHandler.ERROR_EDIT_CONFLICT, "some message");
+		assertThrows(EditConflictErrorException.class, () -> MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
+				MediaWikiApiErrorHandler.ERROR_EDIT_CONFLICT, "some message"));
 	}
 
-	@Test(expected = NoSuchEntityErrorException.class)
+	@Test
 	public void testNoSuchEntityError() throws MediaWikiApiErrorException {
-		MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
-				MediaWikiApiErrorHandler.ERROR_NO_SUCH_ENTITY, "some message");
+		assertThrows(NoSuchEntityErrorException.class, () -> MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
+				MediaWikiApiErrorHandler.ERROR_NO_SUCH_ENTITY, "some message"));
 	}
 
-	@Test(expected = MaxlagErrorException.class)
+	@Test
 	public void testMaxlagError() throws MediaWikiApiErrorException {
-		MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
+		assertThrows(MaxlagErrorException.class, () -> MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(
 				MediaWikiApiErrorHandler.ERROR_MAXLAG,
-				"Waiting for 10.64.16.27: 2 seconds lagged");
+				"Waiting for 10.64.16.27: 2 seconds lagged"));
 	}
 
 }