package uk.gov.dvla.domain;


public class Message
{
    private String key;
    private String message;
    private boolean error;
    private int type;

    public Message(){}

    public Message(String key)
    {
        this.key = key;
    }

    public Message(String key, MessageType type)
    {
        this.key = key;
        this.type = type.getMessageType();
    }

    public Message(String message, boolean error)
    {
        this.message = message;
        this.error = error;
    }

    public String getKey()
    {
        return key;
    }

    public void setKey(String key)
    {
        this.key = key;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public void setError(boolean error)
    {
        this.error = error;
    }

    public boolean isError()
    {
        return this.error;
    }

    public int getType()
    {
        return type;
    }

    public void setType(int type)
    {
        this.type = type;
    }
}

@@ -95,23 +95,27 @@
  String 
-message
+description
 ;%0D%0A    p
@@ -422,23 +422,27 @@
 (String 
-message
+description
 , boolea
@@ -471,33 +471,41 @@
    this.
-message = message
+description = description
 ;%0D%0A     
@@ -671,32 +671,118 @@
  key;%0D%0A    %7D%0D%0A%0D%0A
+    public String getDescription()%0D%0A    %7B%0D%0A        return this.description;%0D%0A    %7D%0D%0A%0D%0A
     public void 
@@ -784,31 +784,35 @@
 void set
-Message
+Description
 (String 
 message)
@@ -803,23 +803,27 @@
 (String 
-message
+description
 )%0D%0A    %7B
@@ -841,25 +841,33 @@
 his.
-message = message
+description = description
 ;%0D%0A 

Introduce integration tests using DropWizards ResourceTest. Include ability to return an Invalid Request message when the DLN or EnquiryId are missing.