### Question:
FileModelSource extends FileSource implements ModelSource2 { @Override public boolean equals( Object obj ) { if ( this == obj ) { return true; } if ( obj == null ) { return false; } if ( !FileModelSource.class.equals( obj.getClass() ) ) { return false; } FileModelSource other = ( FileModelSource ) obj; return getFile().equals( other.getFile() ); } FileModelSource( File pomFile ); @Deprecated File getPomFile(); @Override ModelSource2 getRelatedSource( String relPath ); @Override URI getLocationURI(); @Override boolean equals( Object obj ); @Override int hashCode();  }### Answer:
@Test public void testEquals() throws Exception { File tempFile = createTempFile( "pomTest" ); FileModelSource instance = new FileModelSource( tempFile ); assertFalse( instance.equals( null ) ); assertFalse( instance.equals( new Object() ) ); assertTrue( instance.equals( instance ) ); assertTrue( instance.equals( new FileModelSource( tempFile ) ) ); }
@Test public void testWindowsPaths() throws Exception { assumeTrue( SystemUtils.IS_OS_WINDOWS ); File upperCaseFile = createTempFile( "TESTE" ); String absolutePath = upperCaseFile.getAbsolutePath(); File lowerCaseFile = new File( absolutePath.toLowerCase() ); FileModelSource upperCaseFileSouce = new FileModelSource( upperCaseFile ); FileModelSource lowerCaseFileSouce = new FileModelSource( lowerCaseFile ); assertTrue( upperCaseFileSouce.equals( lowerCaseFileSouce ) ); }