### Question:
OAuth2BearerWWWAuthenticateHeader extends Header { public static OAuth2BearerWWWAuthenticateHeader valueOf(final Message message) { return valueOf(parseSingleValuedHeader(message, NAME)); } OAuth2BearerWWWAuthenticateHeader();  OAuth2BearerWWWAuthenticateHeader(OAuth2Error error); static OAuth2BearerWWWAuthenticateHeader valueOf(final Message message); static OAuth2BearerWWWAuthenticateHeader valueOf(final String string); @Override String getName(); OAuth2Error getOAuth2Error(); @Override List<String> getValues(); static final String NAME; }### Answer:
@Test(dataProvider = "validHeaders") public void testConstructFromMessage(final String header, String realm, List<String> scopes, String error, String errorDescription) { final Response response = new Response(); response.getHeaders().put(NAME, header); OAuth2BearerWWWAuthenticateHeader parsed = OAuth2BearerWWWAuthenticateHeader.valueOf(response); assertEquals(parsed, header, realm, scopes, error, errorDescription); }
@Test(dataProvider = "validHeaders") public void testConstructFromString(final String header, String realm, List<String> scopes, String error, String errorDescription) { OAuth2BearerWWWAuthenticateHeader parsed = OAuth2BearerWWWAuthenticateHeader.valueOf(header); assertEquals(parsed, header, realm, scopes, error, errorDescription); }