First talk to the HR, then the task to find the bugs in a piece of code, then the code to write - video rental application - as others already described.
I saw the negative opinions about the evaluation of their task before, but I though 'well, probably guys covered everything with if-else' and I decided to try despite that.
Unfortunately, this is not the case and I was a fool to spend for that around 2 days. The review was really disappointing, eg. they never saw rich dtos, so when I mocked the dto method they said it was "abuse of mocks". Other remarks were just strange - eg. they said to not use Price class to store the prices. Or they said I didn't use the configuration enough, but I explained in the readme file that I don't put the focus on that, which was allowed according to the description of the task. No remark about any real issue: something not working, any rules violation, transactions issues etc. I didn't learn anything from this review.
I told to the HR that with this amount of work, when the application works and is implemented mostly correctly, then this should be the starting point for the discussion during the interview. Despite I explained each of the 5 review points why I think it's correct, she said "so far we do not review applications twice". Then she wrote "at this moment we are not rush to hire so they want to go for people with new skills which can add sth new to the team" and this was really stupid of them - they saw my CV upfront, since then nothing has changed, but finally my skills was not what they were looking for?
Conclusion: if you have the time to waste, try to apply.