### Question:
FileBasedProctorStore implements ProctorStore { @Override public final void updateTestDefinition( final ChangeMetadata changeMetadata, final String previousVersion, final String testName, final TestDefinition testDefinition, final Map<String, String> metadata ) throws StoreException.TestUpdateException { LOGGER.info(String.format("Update Test Definition: username=%s author=%s testName=%s previousVersion=r%s", changeMetadata.getUsername(), changeMetadata.getAuthor(), testName, previousVersion)); core.doInWorkingDirectory(changeMetadata, previousVersion, new ProctorUpdater() { @Override public boolean doInWorkingDirectory(final RcsClient rcsClient, final File workingDir) throws Exception { final File testDefinitionDirectory = getTestDefinitionDirectoryForTest(testName, workingDir); final File testDefinitionFile = new File(testDefinitionDirectory + File.separator + TEST_DEFINITION_FILENAME); if (!testDefinitionFile.exists()) { throw new StoreException.TestUpdateException("Attempting to update non-existent test " + testName); } boolean thingsChanged = updateThing(rcsClient, testDefinitionFile, testDefinition); final File metaDataFile = new File(testDefinitionDirectory + File.separator + TEST_METADATA_FILENAME); thingsChanged = updateThing(rcsClient, metaDataFile, metadata) || thingsChanged; if (!thingsChanged) { throw new StoreException.TestUpdateException("Attempting to save test definition without changes for test " + testName); } return thingsChanged; } }); } protected  FileBasedProctorStore(final FileBasedPersisterCore core, final String testDefinitionsDirectory); protected  FileBasedProctorStore(final FileBasedPersisterCore core); @Override TestMatrixVersion getCurrentTestMatrix(); @Export(name="core", doc="") FileBasedPersisterCore getCore(); @Override final TestMatrixVersion getTestMatrix(final String fetchRevision); @Override TestDefinition getCurrentTestDefinition(final String testName); @Override TestDefinition getTestDefinition(final String testName, final String fetchRevision); void shutdown(); @Override void close(); @Override final void updateTestDefinition(
            final ChangeMetadata changeMetadata,
            final String previousVersion,
            final String testName,
            final TestDefinition testDefinition,
            final Map<String, String> metadata
    ); @Override final void addTestDefinition(
            final ChangeMetadata changeMetadata,
            final String testName,
            final TestDefinition testDefinition,
            final Map<String, String> metadata
    ); @Override final void deleteTestDefinition(
            final ChangeMetadata changeMetadata,
            final String previousVersion,
            final String testName,
            final TestDefinition testDefinition
    ); static final String DEFAULT_TEST_DEFINITIONS_DIRECTORY; }### Answer:
@Test public void updateTestDefinitionTestDoesNotExist() throws Exception { final TestDefinition definition = new TestDefinition(); final Map<String, String> metadata = Maps.newHashMap(); final Capture<FileBasedProctorStore.ProctorUpdater> capturedArgument = new Capture<>(); coreMock.doInWorkingDirectory( eq("fooUser"), eq("fooPassw0rd"), eq("fooComment"), eq("r0"), capture(capturedArgument) ); EasyMock.expectLastCall(); replay(coreMock); try { store.updateTestDefinition("fooUser", "fooPassw0rd", "fooAuthor", "r0", definition, metadata, "fooComment"); fail("Expected Exception"); } catch (final StoreException.TestUpdateException tue) { assertEquals("Attempting to update non-existent test r0", tue.getCause().getMessage()); } }