This is my test so far:
@Test(expected = FileNotFoundException.class) public void testExpectedException() { UserDataObject u = new UserDataObject(\"rob123\",
The issue is that your verifyUser(UserDataObject u, String filename) method catches both exceptions FileNotFoundException and IOException and hence it is not propagated to your test method.
verifyUser(UserDataObject u, String filename)
FileNotFoundException
IOException