class Test { public T doStuff() { return null; } public boolean test() { return doStuff(); } public Boolean test1() { return doStuff(); } }