### Question:
OAuth2CredentialProvider extends BaseCredentialProvider { @Override public AcquisitionMethod acquisitionMethod() { return new AcquisitionMethod.Builder() .label(labelFor(id)) .icon(iconFor(id)) .type(Type.OAUTH2) .description(descriptionFor(id)) .configured(configured) .build(); } OAuth2CredentialProvider(final String id);  OAuth2CredentialProvider(final String id, final OAuth2ConnectionFactory<S> connectionFactory, final Applicator<AccessGrant> applicator,
        final Map<String, String> additionalQueryParameters); private  OAuth2CredentialProvider(final String id, final OAuth2ConnectionFactory<S> connectionFactory, final Applicator<AccessGrant> applicator,
        final Map<String, String> additionalQueryParameters, final boolean configured); @Override AcquisitionMethod acquisitionMethod(); @Override Connection applyTo(final Connection connection, final CredentialFlowState givenFlowState); @Override CredentialFlowState finish(final CredentialFlowState givenFlowState, final URI baseUrl); @Override String id(); @Override CredentialFlowState prepare(final String connectorId, final URI baseUrl, final URI returnUrl);  }### Answer:
@Test public void shouldCreateAcquisitionMethod() { @SuppressWarnings("unchecked") final OAuth2CredentialProvider<?> oauth2 = new OAuth2CredentialProvider<>("provider2", mock(OAuth2ConnectionFactory.class), mock(Applicator.class), Collections.emptyMap()); final AcquisitionMethod method2 = new AcquisitionMethod.Builder() .description("provider2") .label("provider2") .icon("provider2") .type(Type.OAUTH2) .configured(true) .build(); assertThat(oauth2.acquisitionMethod()).isEqualTo(method2); }