*/
public final class UpdateKeyStringConverterJUnitTest {
@Test
public void run() {
DatabaseTable table = new DatabaseTable("Orders", "");
DatabaseColumn[] columns = {
new DatabaseColumn(table, "OrderID", "int", 0, null, false, false),
new DatabaseColumn(table, "OrderDate", "date", 0, null, false, false),
new DatabaseColumn(table, "CustomerID", "int", 0, null, false, false),
new DatabaseColumn(table, "Status", "String", 0, null, false, false),
};
for (DatabaseColumn c : columns) {
table.addColumn(c);
}
DatabaseColumn[] keys = new DatabaseColumn[] { columns[0], columns[1] };
String s = UpdateKeyStringConverter.toString(Arrays.asList(keys));
DatabaseColumn[] parsedColumns = UpdateKeyStringConverter.fromString(s, table);
assertEquals(Sets.newHashSet(keys), Sets.newHashSet(parsedColumns));