Question: need answer in java8. short code.(kindly given run code)if uh don't know please leave the question.(don't need brefiely explain/only answer need) Your task is to


need answer in java8.
short code.(kindly given run code)if uh don't know please leave the question.(don't need brefiely explain/only answer need)
Your task is to provide a suite of tests for an invert method of Inverter class, using JUnit 4 framework, covering all the requirements below. Description of the invert method invert method accepts a string and returns a string. - When the string is empty it returns empty string. - When the argument passed to the method is null 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"); // returns "a" Inverter.invert(null); // returns "" Inverter.invert("abcd"); // 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. - You do not need to implement the Inverter class or the invert function yourself, you only need to tests it's fuctionality. - 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 wronq implementation of the invert method, at least one of Description of the invert method invert method accepts a string and returns a string. - When the string is empty it returns empty string. - When the argument passed to the method is null 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"); // returns "a" Inverter.invert(null); // returns "n Inverter.invert("abcd"); // 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. - You do not need to implement the Inverter class or the invert function yourself, you only need to tests it's fuctionality. - 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, assertNotEquals, etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
