SipBuilder { public String getTargetSection(Long targetInstanceOid) { TargetInstance inst = targetInstanceManager.getTargetInstance(targetInstanceOid); return getTargetSection(inst); }  static String es(String str); static String dt(Date date); String getTargetSection(Long targetInstanceOid); Map<String, String> buildSipSections(TargetInstance inst); String getProfileNoteSection(TargetInstance inst); boolean updateTargetReference(AbstractTarget target, Map<String,String> sipSections); String getTargetSection(TargetInstance inst); String getPermissionSection(Long targetInstanceOid); String getPermissionSection(TargetInstance inst); void setTargetInstanceManager(TargetInstanceManager targetInstanceManager); void setTargetManager(TargetManager targetManager);  }
@Test public final void testGetTargetSectionLong() { this.testSetTargetInstanceManager(); this.testSetTargetManager(); try { String expectedOutput = "<wct:Target>\n <wct:ReferenceNumber>1234</wct:ReferenceNumber>\n <wct:Name>Test</wct:Name>\n <wct:Description></wct:Description>\n <wct:Seeds>\n <wct:Seed>\n <wct:SeedURL>www.oakleigh.co.uk</wct:SeedURL>\n <wct:SeedType>Primary</wct:SeedType>\n </wct:Seed>\n </wct:Seeds>\n</wct:Target>\n"; String targetSection = testInstance.getTargetSection(5001L); assertNotNull(targetSection); assertEquals(expectedOutput, targetSection); } catch(Exception e) { fail(e.getMessage()); } }
@Test public final void testGetTargetSectionTargetInstance() { this.testSetTargetInstanceManager(); this.testSetTargetManager(); try { String expectedOutput = "<wct:Target>\n <wct:ReferenceNumber>1234</wct:ReferenceNumber>\n <wct:Name>Test</wct:Name>\n <wct:Description></wct:Description>\n <wct:Seeds>\n <wct:Seed>\n <wct:SeedURL>www.oakleigh.co.uk</wct:SeedURL>\n <wct:SeedType>Primary</wct:SeedType>\n </wct:Seed>\n </wct:Seeds>\n</wct:Target>\n"; TargetInstance ti = targetInstanceManager.getTargetInstance(5001L); String targetSection = testInstance.getTargetSection(ti); assertNotNull(targetSection); assertEquals(expectedOutput, targetSection); } catch(Exception e) { fail(e.getMessage()); } }