}
@Test
public void validateParameters() throws ApplicationException {
final Track track = browserDao.getTracks(browserDao.getRandomTrackIds(1)).get(0);
final LastFmUser user = new LastFmUser("lastFmUser", "sessionKey");
final Scrobble scrobble = new Scrobble(user, track, false);
final String method = UpdateNowPlayingClient.METHOD;
new UpdateNowPlayingClient() {
@Override
protected WSResponse executeWSRequest(List<NameValuePair> params) throws ApplicationException {
assertHasParameter(params, PARAM_METHOD, method);
assertHasParameter(params, PARAM_ARTIST, track.getArtist().getName());
assertHasParameter(params, PARAM_ALBUM, track.getMetaData().getAlbum());
assertHasParameter(params, PARAM_TRACK, track.getName());
assertHasParameter(params, PARAM_DURATION, "" + track.getMetaData().getDuration());
assertHasParameter(params, PARAM_SK, user.getSessionKey());
return null;
}