JavaFileWriter { public void createJavaFile(final Context context, final String packageName, final String className, final String classContent) throws IOException { String directoryToBeCreated = packageName.replace(".", File.separator); fileWriter.createFile(context, directoryToBeCreated, className + ".java", classContent); }  void createJavaFile(final Context context, final String packageName,
			final String className, final String classContent);  }
@Test public void testCreateFile() throws IOException { String classContent = "Some arbitrary content"; when(context.getTargetModel()).thenReturn( "target/generated-test-sources/java"); fileJavaWriter.createJavaFile(context, "de.crowdcode.kissmda.test", "Company", classContent); verify(fileWriter).createFile( context, "de" + File.separator + "crowdcode" + File.separator + "kissmda" + File.separator + "test", "Company.java", classContent); }