Write a small function, then write a JUnit test case for it.
Asked in the Technical round 1 stage. This was a live task in the first technical round of Delta's Java full-stack developer loop, alongside core Java 8, Streams and Spring Boot questions.
For this exercise, implement is_even(number), which accepts an integer and returns true when the value is evenly divisible by 2, otherwise false. Include tests for positive, negative, zero, and odd values. The reference format below uses Python, but the interview implementation should use Java and JUnit.
number is an integerdef is_even(number):