test_class.file: leshan-core-cf/src/test/java/org/eclipse/leshan/core/californium/ResponseCodeUtilTest.java
test_class.identifier: ResponseCodeUtilTest
test_case.body: @Test
      public void unknown_lwm2m_code_to_unknown_coap_code() {
          // californium behavior is not really consistent
  
          // for success : code value is lost but we know we use an unknown code
          ResponseCode coapResponseCode = ResponseCodeUtil.toCoapResponseCode(new org.eclipse.leshan.core.ResponseCode(206));
          Assert.assertEquals(ResponseCode._UNKNOWN_SUCCESS_CODE, coapResponseCode);
  
          // for client error,: unknown code is replace by BAD REQUEST ...
          coapResponseCode = ResponseCodeUtil.toCoapResponseCode(new org.eclipse.leshan.core.ResponseCode(425));
          Assert.assertEquals(ResponseCode.BAD_REQUEST, coapResponseCode);
  
          // for server error : unknown code is replace by INTERNAL SERVER ERROR ...
          coapResponseCode = ResponseCodeUtil.toCoapResponseCode(new org.eclipse.leshan.core.ResponseCode(509));
          Assert.assertEquals(ResponseCode.INTERNAL_SERVER_ERROR, coapResponseCode);
  
      }
test_case.class_method_signature: ResponseCodeUtilTest.unknown_lwm2m_code_to_unknown_coap_code()
test_case.full_signature: @Test public void unknown_lwm2m_code_to_unknown_coap_code()
test_case.identifier: unknown_lwm2m_code_to_unknown_coap_code
test_case.invocations: toCoapResponseCode assertEquals toCoapResponseCode assertEquals toCoapResponseCode assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void unknown_lwm2m_code_to_unknown_coap_code()
focal_class.file: leshan-core-cf/src/main/java/org/eclipse/leshan/core/californium/ResponseCodeUtil.java
focal_class.identifier: ResponseCodeUtil
focal_class.class_method_signature: ResponseCodeUtil.toLwM2mCode(org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.full_signature: public static int toLwM2mCode(org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.identifier: toLwM2mCode
focal_class.modifiers: public static
focal_class.parameters: (org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.return: int
focal_class.signature: int toLwM2mCode(org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.class_method_signature: ResponseCodeUtil.toLwM2mResponseCode(
              org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.full_signature: public static ResponseCode toLwM2mResponseCode(
              org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.identifier: toLwM2mResponseCode
focal_class.modifiers: public static
focal_class.parameters: (
              org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.return: ResponseCode
focal_class.signature: ResponseCode toLwM2mResponseCode(
              org.eclipse.californium.core.coap.CoAP.ResponseCode coapResponseCode)
focal_class.class_method_signature: ResponseCodeUtil.toLwM2mCode(int coapCode)
focal_class.full_signature: public static int toLwM2mCode(int coapCode)
focal_class.identifier: toLwM2mCode
focal_class.modifiers: public static
focal_class.parameters: (int coapCode)
focal_class.return: int
focal_class.signature: int toLwM2mCode(int coapCode)
focal_class.class_method_signature: ResponseCodeUtil.toLwM2mResponseCode(int coapCode)
focal_class.full_signature: public static ResponseCode toLwM2mResponseCode(int coapCode)
focal_class.identifier: toLwM2mResponseCode
focal_class.modifiers: public static
focal_class.parameters: (int coapCode)
focal_class.return: ResponseCode
focal_class.signature: ResponseCode toLwM2mResponseCode(int coapCode)
focal_class.class_method_signature: ResponseCodeUtil.toCoapCode(int lwm2mCode)
focal_class.full_signature: public static int toCoapCode(int lwm2mCode)
focal_class.identifier: toCoapCode
focal_class.modifiers: public static
focal_class.parameters: (int lwm2mCode)
focal_class.return: int
focal_class.signature: int toCoapCode(int lwm2mCode)
focal_class.class_method_signature: ResponseCodeUtil.toCoapResponseCode(
              ResponseCode Lwm2mResponseCode)
focal_class.full_signature: public static org.eclipse.californium.core.coap.CoAP.ResponseCode toCoapResponseCode(
              ResponseCode Lwm2mResponseCode)
focal_class.identifier: toCoapResponseCode
focal_class.modifiers: public static
focal_class.parameters: (
              ResponseCode Lwm2mResponseCode)
focal_class.return: org.eclipse.californium.core.coap.CoAP.ResponseCode
focal_class.signature: org.eclipse.californium.core.coap.CoAP.ResponseCode toCoapResponseCode(
              ResponseCode Lwm2mResponseCode)
focal_method.body: public static org.eclipse.californium.core.coap.CoAP.ResponseCode toCoapResponseCode(
              ResponseCode Lwm2mResponseCode) {
          Validate.notNull(Lwm2mResponseCode);
          try {
              return org.eclipse.californium.core.coap.CoAP.ResponseCode.valueOf(toCoapCode(Lwm2mResponseCode.getCode()));
          } catch (MessageFormatException e) {
              throw new IllegalArgumentException("Invalid CoAP code for LWM2M response: " + Lwm2mResponseCode);
          }
      }
focal_method.class_method_signature: ResponseCodeUtil.toCoapResponseCode(
              ResponseCode Lwm2mResponseCode)
focal_method.full_signature: public static org.eclipse.californium.core.coap.CoAP.ResponseCode toCoapResponseCode(
              ResponseCode Lwm2mResponseCode)
focal_method.identifier: toCoapResponseCode
focal_method.invocations: notNull valueOf toCoapCode getCode
focal_method.modifiers: public static
focal_method.parameters: (
              ResponseCode Lwm2mResponseCode)
focal_method.return: org.eclipse.californium.core.coap.CoAP.ResponseCode
focal_method.signature: org.eclipse.californium.core.coap.CoAP.ResponseCode toCoapResponseCode(
              ResponseCode Lwm2mResponseCode)