@Test public void testMatchSequenceKeyWithDescriptorShouldReturnWithNullWhenKeysAreWrong() { String descriptorName = "test"; sequences = new HashMap<>(); sequences.put("something", sequence); given(manager.getSequences(descriptorName)).willReturn(sequences); WilmaSequence result = underTest.matchSequenceKeyWithDescriptor(descriptorName, keys); Assert.assertNull(result); }
public WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds) { Map<String, WilmaSequence> sequences = manager.getSequences(sequenceDescriptorName); WilmaSequence result = null; for (int i = 0; i < sequenceIds.length && result == null; i++) { String actualKey = sequenceKeyResolver.getHandlerKey(sequenceIds[i]); result = sequences.get(actualKey); } return result; }
SequenceMatcher { public WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds) { Map<String, WilmaSequence> sequences = manager.getSequences(sequenceDescriptorName); WilmaSequence result = null; for (int i = 0; i < sequenceIds.length && result == null; i++) { String actualKey = sequenceKeyResolver.getHandlerKey(sequenceIds[i]); result = sequences.get(actualKey); } return result; } }
SequenceMatcher { public WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds) { Map<String, WilmaSequence> sequences = manager.getSequences(sequenceDescriptorName); WilmaSequence result = null; for (int i = 0; i < sequenceIds.length && result == null; i++) { String actualKey = sequenceKeyResolver.getHandlerKey(sequenceIds[i]); result = sequences.get(actualKey); } return result; }  }
SequenceMatcher { public WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds) { Map<String, WilmaSequence> sequences = manager.getSequences(sequenceDescriptorName); WilmaSequence result = null; for (int i = 0; i < sequenceIds.length && result == null; i++) { String actualKey = sequenceKeyResolver.getHandlerKey(sequenceIds[i]); result = sequences.get(actualKey); } return result; }  WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds); }
SequenceMatcher { public WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds) { Map<String, WilmaSequence> sequences = manager.getSequences(sequenceDescriptorName); WilmaSequence result = null; for (int i = 0; i < sequenceIds.length && result == null; i++) { String actualKey = sequenceKeyResolver.getHandlerKey(sequenceIds[i]); result = sequences.get(actualKey); } return result; }  WilmaSequence matchSequenceKeyWithDescriptor(final String sequenceDescriptorName, final String[] sequenceIds);  }