public void testSettingANullDeployableProperty(){
  Deployable deployableElement=new Deployable();
  WAR war=new WAR("/some/file.war");
  Map<String,String> properties=new HashMap<String,String>();
  properties.put("context",null);
  deployableElement.setProperties(properties);
  deployableElement.setPropertiesOnDeployable(war,createDefaultProject("war",null));
  assertEquals("",war.getContext());
}

public void testSettingANullDeployableProperty ( ) { Deployable deployableElement = new Deployable ( ) ; WAR war = new WAR ( "/some/file.war" ) ; Map < String , String > properties = new HashMap < String , String > ( ) ; properties . put ( "context" , null ) ; deployableElement . setProperties ( properties ) ; deployableElement . setPropertiesOnDeployable ( war , createDefaultProject ( "war" , null ) ) ; assertEquals ( "" , war . getContext ( ) ) ; }
setting a null property is the way maven2 operates when the user specifies an empty property . we need to verify that the cargo plugin intercepts that and replaces the null with an empty string .
