Kotlinlearncs.online LogoJava
Return to List

Test Writing: Aussie Slang Translator

Created By: Geoffrey Challen
/ Version: 2026.2.0

Australians are famous for shortening just about every word. Create a method called toAussieSlang that accepts a String containing an English word and returns the Australian slang equivalent.

Use the following translations:

  • "afternoon""arvo"
  • "breakfast""brekkie"
  • "barbecue""barbie"
  • "chicken""chook"
  • "friend""mate"
  • "sunglasses""sunnies"
  • "university""uni"
  • "sandwich""sanga"

If the word is not in the list above, return the original word unchanged.

Test Design Challenge

You're challenge is to write tests for this problem described above.

  • Provide a method named test that accepts no arguments and does not return a value.
  • If the implementation of the class described above is incorrect, your test method should throw an exception.
  • If it is correct, do not throw an exception.
  • You may want to use Java's assert method

Related Lessons

Stuck? You may find these lessons helpful:

Report a Problem

Attribution must link to this page: https://www.learncs.online/testtesting/java/aussie-slang-translator/[email protected]