### Question:
RemotingCommand { public static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader) { return createResponseCommand(RemotingSysResponseCode.SYSTEM_ERROR, "not set any response code", classHeader); } protected  RemotingCommand(); static RemotingCommand createRequestCommand(int code, CommandCustomHeader customHeader); static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader); static RemotingCommand createResponseCommand(int code, String remark,
        Class<? extends CommandCustomHeader> classHeader); static RemotingCommand createResponseCommand(int code, String remark); static RemotingCommand decode(final byte[] array); static RemotingCommand decode(final ByteBuffer byteBuffer); static int getHeaderLength(int length); static SerializeType getProtocolType(int source); static int createNewRequestId(); static SerializeType getSerializeTypeConfigInThisServer(); static byte[] markProtocolType(int source, SerializeType type); void markResponseType(); CommandCustomHeader readCustomHeader(); void writeCustomHeader(CommandCustomHeader customHeader); CommandCustomHeader decodeCommandCustomHeader(
        Class<? extends CommandCustomHeader> classHeader); ByteBuffer encode(); void makeCustomHeaderToNet(); ByteBuffer encodeHeader(); ByteBuffer encodeHeader(final int bodyLength); void markOnewayRPC(); @JSONField(serialize = false) boolean isOnewayRPC(); int getCode(); void setCode(int code); @JSONField(serialize = false) RemotingCommandType getType(); @JSONField(serialize = false) boolean isResponseType(); LanguageCode getLanguage(); void setLanguage(LanguageCode language); int getVersion(); void setVersion(int version); int getOpaque(); void setOpaque(int opaque); int getFlag(); void setFlag(int flag); String getRemark(); void setRemark(String remark); byte[] getBody(); void setBody(byte[] body); HashMap<String, String> getExtFields(); void setExtFields(HashMap<String, String> extFields); void addExtField(String key, String value); @Override String toString(); SerializeType getSerializeTypeCurrentRPC(); void setSerializeTypeCurrentRPC(SerializeType serializeTypeCurrentRPC); static final String SERIALIZE_TYPE_PROPERTY; static final String SERIALIZE_TYPE_ENV; static final String REMOTING_VERSION_KEY; }### Answer:
@Test public void testCreateResponseCommand_FailToCreateCommand() { System.setProperty(RemotingCommand.REMOTING_VERSION_KEY, "2333"); int code = RemotingSysResponseCode.SUCCESS; String remark = "Sample remark"; RemotingCommand cmd = RemotingCommand.createResponseCommand(code ,remark, CommandCustomHeader.class); assertThat(cmd).isNull(); }
@Test public void testCreateResponseCommand_FailToCreateCommand() { System.setProperty(RemotingCommand.REMOTING_VERSION_KEY, "2333"); int code = RemotingSysResponseCode.SUCCESS; String remark = "Sample remark"; RemotingCommand cmd = RemotingCommand.createResponseCommand(code, remark, CommandCustomHeader.class); assertThat(cmd).isNull(); }