@Test public void testEmptyModel() { final HasImports model = new HasImports() { private Imports imports = new Imports(); @Override public Imports getImports() { return imports; } @Override public void setImports(final Imports imports) { } }; final StringBuilder sb = new StringBuilder(); ImportsWriter.write(sb, model); final String drl = sb.toString(); assertNotNull(drl); assertTrue(drl.isEmpty()); }
public static void write(final StringBuilder sb, final HasImports model) { final Imports imports = model.getImports(); if (imports == null) { return; } sb.append(imports.toString()); if (imports.getImports().size() > 0) { sb.append("\n"); } }
ImportsWriter { public static void write(final StringBuilder sb, final HasImports model) { final Imports imports = model.getImports(); if (imports == null) { return; } sb.append(imports.toString()); if (imports.getImports().size() > 0) { sb.append("\n"); } } }
ImportsWriter { public static void write(final StringBuilder sb, final HasImports model) { final Imports imports = model.getImports(); if (imports == null) { return; } sb.append(imports.toString()); if (imports.getImports().size() > 0) { sb.append("\n"); } }  }
ImportsWriter { public static void write(final StringBuilder sb, final HasImports model) { final Imports imports = model.getImports(); if (imports == null) { return; } sb.append(imports.toString()); if (imports.getImports().size() > 0) { sb.append("\n"); } }  static void write(final StringBuilder sb,
                             final HasImports model); }
ImportsWriter { public static void write(final StringBuilder sb, final HasImports model) { final Imports imports = model.getImports(); if (imports == null) { return; } sb.append(imports.toString()); if (imports.getImports().size() > 0) { sb.append("\n"); } }  static void write(final StringBuilder sb,
                             final HasImports model);  }