This could be easily translated as:

```java
Assert.assertEquals(2,generatedSrcFiles.size());
```