@Test public void testFromApplicationNull() { ApplicationManagerMessage amMessage = MessageCreator.fromApplication(null); assertEquals(null, amMessage); }
public static ApplicationManagerMessage fromApplication(Application application) { if(application == null) { return null; } ApplicationManagerMessage message = new ApplicationManagerMessage(); message.setApplicationId(application.getName()); if(application.getDeployments() != null && application.getDeployments().size() > 0) { completeMessage(message, application.getDeployments().get(0), null); } return message; }
MessageCreator { public static ApplicationManagerMessage fromApplication(Application application) { if(application == null) { return null; } ApplicationManagerMessage message = new ApplicationManagerMessage(); message.setApplicationId(application.getName()); if(application.getDeployments() != null && application.getDeployments().size() > 0) { completeMessage(message, application.getDeployments().get(0), null); } return message; } }
MessageCreator { public static ApplicationManagerMessage fromApplication(Application application) { if(application == null) { return null; } ApplicationManagerMessage message = new ApplicationManagerMessage(); message.setApplicationId(application.getName()); if(application.getDeployments() != null && application.getDeployments().size() > 0) { completeMessage(message, application.getDeployments().get(0), null); } return message; }  }
MessageCreator { public static ApplicationManagerMessage fromApplication(Application application) { if(application == null) { return null; } ApplicationManagerMessage message = new ApplicationManagerMessage(); message.setApplicationId(application.getName()); if(application.getDeployments() != null && application.getDeployments().size() > 0) { completeMessage(message, application.getDeployments().get(0), null); } return message; }  static ApplicationManagerMessage fromApplication(Application application); static ApplicationManagerMessage fromDeployment(String applicationName, Deployment deployment, String status); static ApplicationManagerMessage fromVM(String applicationName, Deployment deployment, VM vm); }
MessageCreator { public static ApplicationManagerMessage fromApplication(Application application) { if(application == null) { return null; } ApplicationManagerMessage message = new ApplicationManagerMessage(); message.setApplicationId(application.getName()); if(application.getDeployments() != null && application.getDeployments().size() > 0) { completeMessage(message, application.getDeployments().get(0), null); } return message; }  static ApplicationManagerMessage fromApplication(Application application); static ApplicationManagerMessage fromDeployment(String applicationName, Deployment deployment, String status); static ApplicationManagerMessage fromVM(String applicationName, Deployment deployment, VM vm);  }