In general, its probably best if you leave "DAO" code out of these posts. You may know what they do, but I assure you we have no clue.
I don't even know where to start. In the middle of this "test" you load some "dsParty" and then promptly do nothing with it. Why? At the very beginning you instantiate a "party" and set some attributes, but then immediately throw that instance away when you do the find. Why?
What is it you are trying to test? Then lets write a test that tests that, and then we can see where your code is broken.
If you are simply trying to test updating of detached objects, then try this:
Code:
// open a session and load a party
Session session = PersistenceManager.getSession();
Party party = // however you get a reference to a party
// make the party detached
session.evict(party);
// now lets change the detached instance
party.setUserName("changedtestuser");
party.setPassword("changeduserpassword");
// and reassociate it with the session
session.update(party);
// finally persist the changes
session.flush();