### Question:
CredentialFlowStateHelper { static javax.ws.rs.core.Cookie toJaxRsCookie(final Cookie cookie) { return new javax.ws.rs.core.Cookie(cookie.getName(), cookie.getValue(), cookie.getPath(), cookie.getDomain()); } private  CredentialFlowStateHelper();   }### Answer:
@Test public void shouldConvertServletCookieToJaxRsCookie() { final Cookie given = new Cookie("myCookie", "myValue"); given.setDomain("example.com"); given.setPath("/path"); given.setMaxAge(1800); given.setHttpOnly(true); given.setSecure(true); final javax.ws.rs.core.Cookie expected = new javax.ws.rs.core.Cookie("myCookie", "myValue", "/path", "example.com"); assertThat(CredentialFlowStateHelper.toJaxRsCookie(given)).isEqualTo(expected); }