ResponseCodeUtil { public static ResponseCode toLwM2mResponseCode( org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode) { return ResponseCode.fromCode(toLwM2mCode(coapResponseCode)); }  static int toLwM2mCode(org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode); static ResponseCode toLwM2mResponseCode(
            org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode); static int toLwM2mCode(int coapCode); static ResponseCode toLwM2mResponseCode(int coapCode); static int toCoapCode(int lwm2mCode); static org.eclipse.californium.core.coap.CoAP.ResponseCode toCoapResponseCode(
            ResponseCode Lwm2mResponseCode);  }
@Test public void known_coap_code_to_known_lwm2m_Code() { org.eclipse.leshan.core.ResponseCode lwM2mResponseCode = ResponseCodeUtil.toLwM2mResponseCode(ResponseCode.CREATED); Assert.assertEquals(org.eclipse.leshan.core.ResponseCode.CREATED, lwM2mResponseCode); Assert.assertEquals("CREATED", lwM2mResponseCode.toString()); }
@Test public void known_coap_code_to_unknown_lwm2m_code() { org.eclipse.leshan.core.ResponseCode lwM2mResponseCode = ResponseCodeUtil .toLwM2mResponseCode(ResponseCode.GATEWAY_TIMEOUT); Assert.assertEquals(504, lwM2mResponseCode.getCode()); Assert.assertEquals(org.eclipse.leshan.core.ResponseCode.UNKNOWN, lwM2mResponseCode.getName()); Assert.assertEquals("UNKNOWN(504)", lwM2mResponseCode.toString()); }