System.out.println(meta.toString());
}
@Test
public void findByNumber() throws JIException, ParseException {
OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
System.out.println(manager.getManagerName());
System.out.println(manager.getMetadata().getFullName());
// ------------------------
OCStructure struct = manager.createEmptyStruct();
//-------------------------
String number = "102-И09-8x";
Date date = (new SimpleDateFormat("yyyy")).parse("2009");
OCDocumentRef ref0 = manager.findByNumber(number);
System.out.println(ref0.isEmpty() + " " + ref0.getUUID());
assertTrue(ref0.isEmpty());
OCDocumentRef ref1 = manager.findByNumber(number, date);
System.out.println(ref1.getNumberAsString() + " " + ref1.isEmpty() + " " + ref1.getUUID());
assertFalse(ref1.isEmpty());
assertTrue(ref1.getNumberAsString().trim().equals(number));
}