### Question:
ClassInstructionSet implements InstructionSet { @Override public Executor getExecutor (String instructionName) { String methodName = getMethodName (instructionName); Method method = getMethod (methodName); if (method == null) { method = getAnnotatedMethod (methodName); if (method == null) { return null; } else if (method.isAnnotationPresent (KeywordName.class) && method.isAnnotationPresent (ParameterOrder.class)) { return new ShuffledParametersMethodExecutor (mObject, method, mParameterConvertors); } } else if (method.getParameterTypes ().length == 1 && Map.class.isAssignableFrom (method.getParameterTypes ()[0])) { return new MapMethodExecutor (mObject, method); } return new MethodExecutor (mObject, method, mParameterConvertors); } ClassInstructionSet(String name, Object object, ParameterConvertors parameterConvertors); @Override String getName(); @Override void setup(); @Override Executor getExecutor(String instructionName); @Override void cleanup();  }### Answer:
@Test public void testGetExecutorUnknownInstruction () { String instructionName = "unknown instruction name"; InstructionSetImpl userInstructionSet = new InstructionSetImpl (); ClassInstructionSet instructionSet = new ClassInstructionSet (NAME, userInstructionSet, null); assertNull (instructionSet.getExecutor (instructionName)); }
@Test public void testGetExecutorInstructionNoParameters () { String instructionName = "instruction name"; InstructionSetImpl userInstructionSet = new InstructionSetImpl (); ClassInstructionSet instructionSet = new ClassInstructionSet (NAME, userInstructionSet, null); assertTrue (instructionSet.getExecutor (instructionName) instanceof MethodExecutor); }
@Test public void testGetExecutorInstructionWithParameters () { String instructionName = "instruction _ name _"; InstructionSetImpl userInstructionSet = new InstructionSetImpl (); ClassInstructionSet instructionSet = new ClassInstructionSet (NAME, userInstructionSet, null); assertTrue (instructionSet.getExecutor (instructionName) instanceof MethodExecutor); }
@Test public void testGetExecutorAnnotatedInstructionWithParameters () { String instructionName = "alternative instruction name"; InstructionSetImpl userInstructionSet = new InstructionSetImpl (); ClassInstructionSet instructionSet = new ClassInstructionSet (NAME, userInstructionSet, null); assertTrue (instructionSet.getExecutor (instructionName) instanceof ShuffledParametersMethodExecutor); }