N26 interview question

Easy leetcode question in Java, i got asked to write tests and throw exceptions