	@Test
	public void multipleCallsAreDelegatedToFiler() throws IOException{

		Filer filer = mock(Filer.class);

		FileObject fileObject = mock(FileObject.class);
		when(filer.createResource(Mockito.<Location> any(), anyString(), anyString())).thenReturn(fileObject);
		
		ResourceCodeWriter resourceCodeWriter = new ResourceCodeWriter(filer);
		JPackage jPackage = new JCodeModel()._package("some.package");
		resourceCodeWriter.openBinary(jPackage, null);
		resourceCodeWriter.openBinary(jPackage, null);
		
		 verify(filer, times(2)).createResource(Mockito.<Location> any(), anyString(), anyString());

	}