Dificuldades de gerar IllegalArgumentException

pode me ajudar a gerar IllegalArgumentException e IllegalStateException?

/**[code]
* Método main que lança java.lang.ClassCastException
* @param args
*/
public static void main(String[] args) {
TestarExcecoes t = new TestarExcecoes();
new TestarExcecoes().metodoGeraIllegalArgumentException(t);
}

TestarExcecoes metodoGeraIllegalArgumentException(TestarExcecoes t1){
	if (t1.equals( this )){
		throw new IllegalArgumentException("Objeto diferente!");
	}
	else
		System.out.println("Ok");
	return t1;
}[/code]

Se vc gera 2 objetos diferentes, você não vai entrar no seu if:

[code] public static void main(String[] args) {
TestarExcecoes t = new TestarExcecoes();
t.metodoGeraIllegalArgumentException(t);
}

TestarExcecoes metodoGeraIllegalArgumentException(TestarExcecoes t1){
if (t1.equals( this )){
throw new IllegalArgumentException(“Objeto diferente!”);
}
else
System.out.println(“Ok”);
return t1;
} [/code]

Outra possibilidade (que parece fazer mais sentido), é colocar um ! no seu if.