diff --git a/pom.xml b/pom.xml
index 25da0fe..473fb58 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,22 +4,50 @@
4.0.0
io.diffblue.corebanking
CoreBanking
- 1.0.0
+ 1.0.1-JUnit5
UTF-8
1.8
1.8
+ 0.8.5
+
- junit
- junit
- 4.13.2
+ org.mockito
+ mockito-core
+ 4.7.0
test
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.5.2
+ test
+
+
+ org.jacoco
+ org.jacoco.agent
+ 0.8.2
+ test
+ runtime
+
+
+
+ org.pitest
+ pitest-maven
+ 1.5.2
+
+
+ org.pitest
+ pitest-junit5-plugin
+ 0.12
+
+
+
org.apache.maven.plugins
maven-assembly-plugin
@@ -52,7 +80,33 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.0.0
+ 3.0.0-M3
+
+
+ org.junit.platform
+ junit-platform-surefire-provider
+ 1.2.0
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ prepare-package
+
+ report
+
+
+
diff --git a/src/main/java/io/diffblue/corebanking/account/Account.java b/src/main/java/io/diffblue/corebanking/account/Account.java
index 9afe07d..3ea5a83 100644
--- a/src/main/java/io/diffblue/corebanking/account/Account.java
+++ b/src/main/java/io/diffblue/corebanking/account/Account.java
@@ -91,7 +91,7 @@ public void takeFromBalance(final long amount) throws AccountException {
if (getAccountState() != AccountState.OPEN) {
throw new AccountException("Cannot take from balance, account is closed.");
}
- if (currentBalance + amount < 0) {
+ if (currentBalance - amount < 0) {
throw new AccountException(
"Trying to take "
+ amount
@@ -208,7 +208,7 @@ public class AccountStatement {
private final List transactions;
/** Constructor. */
- private AccountStatement() {
+ public AccountStatement() {
transactions = new ArrayList();
}