### Question:
FileInstruction extends PluginInstruction { @Override public InstructionStatus process(final PluginContext context, final InstructionStatus previousStatus) { log.debug("executing FILE Instruction {}", this); processPlaceholders(context.getPlaceholderData()); this.context = context; if (!valid()) { eventBus.post(new MessageEvent("Invalid instruction descriptor: " + toString())); eventBus.post(new InstructionEvent(this)); return InstructionStatus.FAILED; } if (action.equals(COPY)) { return copy(); } else if (action.equals(DELETE)) { return delete(); } eventBus.post(new InstructionEvent(this)); return InstructionStatus.FAILED; }  @Override InstructionStatus process(final PluginContext context, final InstructionStatus previousStatus); @XmlAttribute(name = "binary") boolean isBinary(); void setBinary(final boolean binary); @Override void processPlaceholders(final Map<String, Object> data); @XmlAttribute boolean isOverwrite(); void setOverwrite(final boolean overwrite); @XmlAttribute String getSource(); void setSource(final String source); @XmlAttribute String getTarget(); void setTarget(final String target); @XmlAttribute @Override String getMessage(); @Override void setMessage(final String message); @XmlAttribute @Override String getAction(); @Override void setAction(final String action); @Override String toString(); static final Set<String> VALID_ACTIONS; }### Answer:
@Test public void testProcess() throws Exception { final InstructionSet set = new PluginInstructionSet(); set.addInstruction(copyInstruction); InstructionStatus status = executor.execute(set, getContext()); assertTrue(status == InstructionStatus.FAILED); copyInstruction.setAction(PluginInstruction.COPY); copyInstruction.setSource(SOURCE); copyInstruction.setTarget(TARGET); copyInstruction.setOverwrite(true); status = executor.execute(set, getContext()); assertTrue(status == InstructionStatus.SUCCESS || status == InstructionStatus.SKIPPED); assertTrue(!copyInstruction.getMessage().contains("{{")); File file = new File(copyInstruction.getTarget()); assertTrue(file.exists()); StringBuilder textFile = GlobalUtils.readTextFile(file.toPath()); assertTrue(textFile.toString().contains(BaseTest.PROJECT_NAMESPACE_TEST)); copyInstruction.setOverwrite(true); copyInstruction.setBinary(true); executor.execute(set, getContext()); file = new File(copyInstruction.getTarget()); assertTrue(file.exists()); textFile = GlobalUtils.readTextFile(file.toPath()); assertTrue(textFile.toString().contains("{{namespace}}")); deleteInstruction.setAction(PluginInstruction.DELETE); deleteInstruction.setTarget(TARGET); final InstructionSet deleteSet = new PluginInstructionSet(); deleteSet.addInstruction(deleteInstruction); status = executor.execute(deleteSet, getContext()); assertTrue(status == InstructionStatus.SUCCESS); assertTrue(!deleteInstruction.getMessage().contains("{{")); }