Couchbase 5.1 java sdk configuration sample code

Hi Team,
We were using Couchbase 4.6 till now which requires only bucket name, bucket password and cluster name but we are migrating to couchbase 5.1 now which has couchbase username, password, bucket name and cluster name
In the enterprise level we need do all these changes but i am.getting some error while running the configuration for 5.1 after doing all the required changes.
Can someone please provide sample code for configuration class for Couchbase 5.1 java sdk.