void T_CSPSettingsEngine::T_CSPSettingsEngine_AddEntryLL(  )
    {
    CSPEntry* entry = CSPEntry::NewLC();
    TServiceId id = entry->GetServiceId();

    EUNIT_ASSERT_SPECIFIC_LEAVE( iCSPSettingsEngine->AddEntryL( *entry ), KErrArgument ) ;
    
    User::LeaveIfError( entry->SetServiceName( _L("Nimi") ) );
    iCSPSettingsEngine->AddEntryL( *entry );
    EUNIT_ASSERT( id != entry->GetServiceId() );

    CleanupStack::PopAndDestroy( entry );    
    }
void T_CSPSettings::T_CSPSettings_DeleteEntryLL(  )
    {
    CSPEntry* entry = CSPEntry::NewLC();
    User::LeaveIfError( entry->SetServiceName( _L("Nimi") ) );
    TInt id = entry->GetServiceId();
    
    EUNIT_ASSERT( KErrNotFound == iCSPSettings->DeleteEntryL( id ) );
    
    iCSPSettings->AddEntryL( *entry );
    id = entry->GetServiceId();
    EUNIT_ASSERT( KErrNone == iCSPSettings->DeleteEntryL( id ) );
    CleanupStack::PopAndDestroy( entry );
    }
// ---------------------------------------------------------------------------
// Update existing service provider settings entry
// ---------------------------------------------------------------------------
//
TInt CSPSettingsEngine::UpdateEntryL( const CSPEntry& aEntry )
    {
    XSPSLOGSTRING( "CSPSettingsEngine::UpdateEntry() - IN" );

    TServiceId serviceId( aEntry.GetServiceId() );

    // Leave if there is no service ID 
    if ( KSPNoId == serviceId || aEntry.GetServiceName().Length() == 0 )
        {
        User::Leave( KErrArgument );
        }

    // construct RIpAppPropArray
    RIpAppPropArray array;
    TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
    CleanupStack::PushL( cleanup );
    
    ConvertSpEntryToCenRepArrayL( aEntry, array );

    TInt err = iCenRepUtils->UpdateEntryL( (TInt) serviceId, array );
    
    CleanupStack::PopAndDestroy( &array );
    
    XSPSLOGSTRING( "CSPSettingsEngine::UpdateEntry() - OUT" );
    
    return err;
    }