PrimaryLock extends ThemisLock { public void addSecondaryColumn(ColumnCoordinate columnCoordinate, Type put) { this.secondaryColumns.put(columnCoordinate, put); } PrimaryLock();  PrimaryLock(Type type); Type getSecondaryColumn(ColumnCoordinate columnCoordinate); Map<ColumnCoordinate, Type> getSecondaryColumns(); void addSecondaryColumn(ColumnCoordinate columnCoordinate, Type put); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override boolean equals(Object object); @Override String toString(); @Override boolean isPrimary();  }
@Test public void testAddSecondaryColumn() throws IOException { PrimaryLock lock = new PrimaryLock(); lock.addSecondaryColumn(COLUMN, Type.Put); Assert.assertEquals(Type.Put, lock.getSecondaryColumn(COLUMN)); lock.addSecondaryColumn(COLUMN, Type.DeleteColumn); Assert.assertEquals(Type.DeleteColumn, lock.getSecondaryColumn(COLUMN)); lock.addSecondaryColumn(COLUMN_WITH_ANOTHER_TABLE, Type.Put); Assert.assertEquals(2, lock.getSecondaryColumns().size()); }