### Question:
SerializationContextImpl implements SerializationContext { @Override public void unregisterProtoFile(String fileName) { log.debugf("Unregistering proto file : %s", fileName); writeLock.lock(); try { FileDescriptor fileDescriptor = fileDescriptors.remove(fileName); if (fileDescriptor != null) { unregisterFileDescriptorTypes(fileDescriptor); } else { throw new IllegalArgumentException("File " + fileName + " does not exist"); } } finally { writeLock.unlock(); } } SerializationContextImpl(Configuration configuration); @Override Configuration getConfiguration(); @Override Map<String, FileDescriptor> getFileDescriptors(); @Override Map<String, GenericDescriptor> getGenericDescriptors(); @Override void registerProtoFiles(FileDescriptorSource source); @Override void unregisterProtoFile(String fileName); @Override void unregisterProtoFiles(Set<String> fileNames); @Override Descriptor getMessageDescriptor(String fullTypeName); @Override EnumDescriptor getEnumDescriptor(String fullTypeName); @Override void registerMarshaller(BaseMarshaller<?> marshaller); @Override void unregisterMarshaller(BaseMarshaller<?> marshaller); @Override void registerMarshallerProvider(MarshallerProvider marshallerProvider); @Override void unregisterMarshallerProvider(MarshallerProvider marshallerProvider); @Override boolean canMarshall(Class<?> javaClass); @Override boolean canMarshall(String fullTypeName); @Override BaseMarshaller<T> getMarshaller(String fullTypeName); @Override BaseMarshaller<T> getMarshaller(Class<T> clazz); BaseMarshallerDelegate<T> getMarshallerDelegate(String descriptorFullName); BaseMarshallerDelegate<T> getMarshallerDelegate(Class<T> javaClass); @Deprecated @Override String getTypeNameById(Integer typeId); @Deprecated @Override Integer getTypeIdByName(String fullTypeName); @Override GenericDescriptor getDescriptorByName(String fullTypeName); @Override GenericDescriptor getDescriptorByTypeId(Integer typeId);  }### Answer:
@Test public void testUnregisterMissingFiles() { exception.expect(IllegalArgumentException.class); exception.expectMessage("File test.proto does not exist"); SerializationContext ctx = createContext(); ctx.unregisterProtoFile("test.proto"); }