JUnit expected exceptions, timeout and ignoring tests

JUnit expected exceptions, timeout and ignoring tests using @Ignore.

Sometimes you want to test that some method returns expected exception. You can easily do that by specifying attribute "expected" on annotation @Test.

You can also test that a unit test must take less than X milliseconds to execute, by specifying attribute "timeout" on annotation @Test

Sometimes you want to ignore some test (for example you have an unfinished test and your boss tells you to test something else). For such situations is annotation @Ignore