SimpleGapPenalty implements GapPenalty { public SimpleGapPenalty() { this(dgop, dgep); } SimpleGapPenalty();  SimpleGapPenalty(short gop, short gep); static void setDefaultExtensionPenalty(short gep); static void setDefaultOpenPenalty(short gop); @Override short getExtensionPenalty(); @Override short getOpenPenalty(); @Override Type getType(); @Override void setExtensionPenalty(short gep); @Override void setOpenPenalty(short gop);  }
@Test public void testSimpleGapPenalty() { short gop = -12, gep = -3; GapPenalty defaults = new SimpleGapPenalty(); SimpleGapPenalty.setDefaultOpenPenalty(gop); SimpleGapPenalty.setDefaultExtensionPenalty(gep); GapPenalty gaps = new SimpleGapPenalty(); assertEquals(gaps.getOpenPenalty(), gop); assertEquals(gaps.getExtensionPenalty(), gep); assertEquals(gaps.getType(), GapPenalty.Type.AFFINE); SimpleGapPenalty.setDefaultOpenPenalty(defaults.getOpenPenalty()); SimpleGapPenalty.setDefaultExtensionPenalty(defaults.getExtensionPenalty()); }