### Question:
CodeSystemConvertor { public Code convertToInternalCode(Code code) throws InternalCodeNotFoundException { if (!this.codeConversionmap.containsKey(code)) { throw new InternalCodeNotFoundException("Could not find an internal code that match to: " + code.getSystem() + " " + code.getCode()); } return this.codeConversionmap.get(code); } CodeSystemConvertor(); void addCodeConversionMap(Map<Code, Code> newMap); Code convertToInternalCode(Code code); Map<Code, Code> getCodeConversionmap();  }### Answer:
@Test public void convertToInternalCode() throws Exception { CodeSystemConvertor codeSystemConvertor = new CodeSystemConvertor(); Code v2 = Code.getNewCode().setSystem("http: Code internal = codeSystemConvertor.convertToInternalCode(v2); assertEquals(InternalCodeSystem.SYSTEMNAME, internal.getSystem()); assertEquals("POS", internal.getCode()); assertEquals("present", internal.getDisplay()); Code v2_1 = Code.getNewCode().setSystem("http: Code internal2 = codeSystemConvertor.convertToInternalCode(v2_1); assertEquals(InternalCodeSystem.SYSTEMNAME, internal2.getSystem()); assertNotEquals("N", internal2.getCode()); assertNotEquals("normal", internal2.getDisplay()); Code v2_2 = Code.getNewCode().setSystem("http: Code internal3 = codeSystemConvertor.convertToInternalCode(v2_2); assertEquals(InternalCodeSystem.SYSTEMNAME, internal2.getSystem()); assertNotEquals("POS", internal2.getCode()); assertNotEquals("present", internal2.getDisplay()); Code v2_3 = Code.getNewCode().setSystem("http: Code internal4 = codeSystemConvertor.convertToInternalCode(v2_3); assertEquals(InternalCodeSystem.SYSTEMNAME, internal2.getSystem()); assertEquals("A", internal2.getCode()); assertEquals("abnormal", internal2.getDisplay()); }