import java.io.File;
import org.opensim.modeling.*;

class TestDataAdapter {
    public static void test_C3DFileAdapter() {
        C3DFileAdapter c3dAdapter = new C3DFileAdapter();
        StdMapStringTimeSeriesTableVec3 tables =
            c3dAdapter.read("../../../../OpenSim/Common/Test/walking5.c3d");
        TimeSeriesTableVec3 markerTable = tables.get("markers");
        assert markerTable.getNumRows()    == 1103;
        assert markerTable.getNumColumns() == 40;

        TimeSeriesTable markerTableFlat = markerTable.flatten();
        assert markerTableFlat.getNumRows()    == 1103;
        assert markerTableFlat.getNumColumns() == 40 * 3;

        String fileName = new String("testDataAdapter.mot");
        STOFileAdapter stoAdapter = new STOFileAdapter();
        stoAdapter.write(markerTableFlat, fileName);

        TimeSeriesTable markerTableDouble = stoAdapter.read(fileName);
        assert markerTableDouble.getNumRows()    == 1103;
        assert markerTableDouble.getNumColumns() == 40 * 3;

        File file = new File(fileName);
        file.delete();
    }

    public static void main(String[] args) {
        test_C3DFileAdapter();
    }
};

@@ -297,24 +297,33 @@
 ing5.c3d%22);%0A
+        %0A
         Time
@@ -673,17 +673,23 @@
  String 
-f
+markerF
 ileName 
@@ -706,23 +706,15 @@
 ng(%22
-testDataAdapt
+mark
 er
+s
 .mot
@@ -817,17 +817,23 @@
 leFlat, 
-f
+markerF
 ileName)
@@ -895,17 +895,23 @@
 er.read(
-f
+markerF
 ileName)
@@ -1043,30 +1043,437 @@
     
-File file = new File(f
+TimeSeriesTableVec3 forceTable = tables.get(%22forces%22);%0A        assert forceTable.getNumRows()    == 8824;%0A        assert forceTable.getNumColumns() == 6;%0A%0A        TimeSeriesTable forceTableFlat = forceTable.flatten();%0A        assert forceTableFlat.getNumRows()    == 8824;%0A        assert forceTableFlat.getNumColumns() == 6 * 3;%0A%0A        File file = new File(markerFileName);%0A        file.delete();%0A        file = new File(forceF
 ileN

Add Java test to read/write forces table from C3D along with markers table.