@Test
public void testSerialization() throws Exception {

    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    ObjectOutputStream out = new ObjectOutputStream(buffer);
    out.writeObject(align);
    out.close();
    ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
    Object dest = in.readObject();
    in.close();
    assertTrue(dest instanceof BiojavaPairwiseAlignment);
    assertNotNull(((BiojavaPairwiseAlignment) dest).getSubstitutionMatrix());
}