I think it's generally ok (I'd introduce a String constant for your SQL to avoid repeating it, btw).
Of course, the one thing you're not testing with this is the actual interaction with the database (since this is being mocked out). So I would expect a corresponding test (or set of?) that actually interact with the database, and insert/rollback as appropriate. Otherwise you're testing something that (at the moment) is quite trivial.
A note on test organisation. The below tests 2 things (null construction fails, and normal construction succeeds). I would split this into two tests, otherwise if the first section fails, you never test the second section (in more complex scenarios, this makes fault diagnosis more difficult, since you may not have as much evidence as you require)
public void testPostDAO() {
try {
new PostDAO(null);
fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException ex) {}
new PostDAO(connectionMock);
}
Some people object to testing new PostDAO(null)
due to its triviality. I disagree. One of the reasons you write tests is to ensure behaviour doesn't change unless you expect it to. So the above is good - I'd just split it into two explicit tests.