MockList { public static List<Class<? extends EvoSuiteMock>> getList() { List<Class<? extends EvoSuiteMock>> list = new ArrayList<>(); if (RuntimeSettings.useVFS) { list.add(MockFile.class); list.add(MockFileInputStream.class); list.add(MockFileOutputStream.class); list.add(MockRandomAccessFile.class); list.add(MockFileReader.class); list.add(MockFileWriter.class); list.add(MockPrintStream.class); list.add(MockPrintWriter.class); list.add(MockFileHandler.class); list.add(MockJFileChooser.class); list.add(MockFileSystemView.class); } if (RuntimeSettings.mockJVMNonDeterminism) { list.add(MockRuntime.class); list.add(MockLogRecord.class); list.add(MockDefaultListSelectionModel.class); list.add(MockDate.class); list.add(MockRandom.class); list.add(MockGregorianCalendar.class); list.add(MockCalendar.class); list.add(MockDateFormat.class); list.add(MockSimpleDateFormat.class); list.add(MockSpinnerDateModel.class); list.add(MockSecureRandom.class); list.add(MockUUID.class); list.add(MockClock.class); list.add(MockInstant.class); list.add(MockLocalDate.class); list.add(MockLocalDateTime.class); list.add(MockLocalTime.class); list.add(MockMonthDay.class); list.add(MockOffsetDateTime.class); list.add(MockOffsetTime.class); list.add(MockYear.class); list.add(MockYearMonth.class); list.add(MockZonedDateTime.class); list.add(MockHijrahChronology.class); list.add(MockHijrahDate.class); list.add(MockIsoChronology.class); list.add(MockJapaneseChronology.class); list.add(MockJapaneseDate.class); list.add(MockMinguoDate.class); list.add(MockMinguoChronology.class); list.add(MockThaiBuddhistChronology.class); list.add(MockThaiBuddhistDate.class); list.add(MockPreferences.class); list.add(MockTimer.class); list.add(MockThread.class); list.add(MockIOException.class); list.add(MockArithmeticException.class); list.add(MockArrayIndexOutOfBoundsException.class); list.add(MockError.class); list.add(MockException.class); list.add(MockIllegalAccessException.class); list.add(MockIllegalArgumentException.class); list.add(MockIllegalStateException.class); list.add(MockNullPointerException.class); list.add(MockRuntimeException.class); list.add(MockThrowable.class); } if (RuntimeSettings.useVNET) { list.add(MockDatagramSocket.class); list.add(MockInetAddress.class); list.add(MockInetSocketAddress.class); list.add(MockNetworkInterface.class); list.add(MockServerSocket.class); list.add(MockSocket.class); list.add(MockSocketImpl.class); list.add(MockURL.class); list.add(MockURLStreamHandler.class); list.add(MockURI.class); } if (RuntimeSettings.mockGUI) { list.add(MockJOptionPane.class); } return list; }  static List<Class<? extends EvoSuiteMock>> getList(); static boolean shouldBeMocked(String originalClass); static boolean isAMockClass(String mockClass); static Class<?> getMockClass(String originalClass);  }
@Test public void checkGetJVMMocks(){ RuntimeSettings.mockJVMNonDeterminism = false; List<Class<? extends EvoSuiteMock>> list = MockList.getList(); Assert.assertFalse(list.contains(MockRuntime.class)); Assert.assertFalse(list.contains(MockException.class)); RuntimeSettings.mockJVMNonDeterminism = true; list = MockList.getList(); Assert.assertTrue(list.contains(MockRuntime.class)); Assert.assertTrue(list.contains(MockException.class)); }