{
try
{
String userId = "CST-" + ( System.currentTimeMillis( ) % 1000000 );
AccountValue act0 = new AccountValue( userId, "password" );
CustomerValue cst0 = new CustomerValue( null, "firstnam", "lastnam", userId + "@foo.com", "222-22", "f", "street2.", "street2.", "city", "O", "A1A-1A1", "C", "111-111-111", "Visa", "01-21" );
cst0.setAccountValue( act0 );
//System.out.println( "creating customer=" + cst0 );
String id = _petstore.createCustomer( cst0 );
AccountValue act1 = new AccountValue( userId, "password1" );
CustomerValue cst1 = new CustomerValue( id, "firstname2", "lastname2", userId + "-2@foo.com", "222-222", "fr", "street2.1", "street2.2", "city2", "ON", "A2A-2A2", "CA", "222-222-222", "Amex", "02-22" );
cst1.setAccountValue( act1 );
//System.out.println( "updating customer=" + cst1 );
_petstore.updateCustomer( cst1 );
CustomerValue cst = _petstore.getCustomer( id );
AccountValue act = cst.getAccountValue( );
//System.out.println( "customer=" + cst );
assertEquals( "firstname", "firstname2", cst.getFirstname( ) );
assertEquals( "lastname", "lastname2", cst.getLastname( ) );
assertEquals( "telephone", "222-222", cst.getTelephone( ) );
assertEquals( "email", userId + "-2@foo.com", cst.getEmail( ) );
assertEquals( "language", "fr", cst.getLanguage( ) );
assertEquals( "street1", "street2.1", cst.getStreet1( ) );
assertEquals( "street2", "street2.2", cst.getStreet2( ) );
assertEquals( "city", "city2", cst.getCity( ) );
assertEquals( "zipcode", "A2A-2A2", cst.getZipcode( ) );
assertEquals( "state", "ON", cst.getState( ) );
assertEquals( "country", "CA", cst.getCountry( ) );
assertEquals( "creditCardType", "Amex", cst.getCreditCardType( ) );
assertEquals( "creditCardNumber", "222-222-222", cst.getCreditCardNumber( ) );
assertEquals( "creditCardExpiryDate", "02-22", cst.getCreditCardExpiryDate( ) );
assertEquals( "account.userId", userId, act.getUserId( ) );
assertEquals( "account.password", "password1", act.getPassword( ) );
}
catch ( FinderException f )
{