Question: need answer in JAVA8 OR JAVA11. - Your task is to implement a suite of tests in JUnit 4 that will - When the argument


need answer in JAVA8 OR JAVA11.

- Your task is to implement a suite of tests in JUnit 4 that will - When the argument passed to the method is nu11 it returns an empty string - When the string has exactly one character the same string is returned - When the string is longer then 1 character its inverted version is returned. Examples of invert method usage Inverter. invert ("a"); I/ returns " a " Inverter. invert(nu11); 11 returns Inverter. Invert("abcd"); I/ return "dcba" Requirements - Your task is to implement a suite of tests in JUnit 4 that will test all the possible behaviours of the invert method, as described above. - Your suite of tests will be run against multiple (wrong and correct) implementations of invert method. - All tests must pass for correct implementation. Otherwise you will receive 0%, so make sure that all tests pass for the correct one before submitting the task. - For a wrong implementation of the invert method, at least one of the test cases should fail.. - For assertions, use static methods provided by the org. junit. Assert class, i.e. assertEquals, assert NotEquals, etc. Solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
