### Question:
ReadZeebeDeploymentValue extends ReadAnnotationValue<ClassInfo, ZeebeDeployment, ZeebeDeploymentValue> { @Override public Optional<ZeebeDeploymentValue> apply(final ClassInfo classInfo) { return classInfo .getAnnotation(annotationType) .map( annotation -> ZeebeDeploymentValue.builder() .beanInfo(classInfo) .classPathResources( resolveResources(annotation.classPathResources()) ) .build()); } ReadZeebeDeploymentValue(final ZeebeExpressionResolver resolver); @Override Optional<ZeebeDeploymentValue> apply(final ClassInfo classInfo);  }### Answer:
@Test public void shouldReadSingleClassPathResourceTest() { ClassInfo classInfo = ClassInfo.builder() .bean(new WithSingleClassPathResource()) .build(); when(expressionResolver.resolve(anyString())).thenAnswer(inv -> inv.getArgument(0)); ZeebeDeploymentValue expectedDeploymentValue = ZeebeDeploymentValue.builder() .beanInfo(classInfo) .classPathResources(Collections.singletonList("/1.bpmn")) .build(); Optional<ZeebeDeploymentValue> valueForClass = readZeebeDeploymentValue.apply(classInfo); assertTrue(valueForClass.isPresent()); assertEquals(expectedDeploymentValue, valueForClass.get()); }
@Test public void shouldReadMultipleClassPathResourcesTest() { ClassInfo classInfo = ClassInfo.builder() .bean(new WithMultipleClassPathResource()) .build(); when(expressionResolver.resolve(anyString())).thenAnswer(inv -> inv.getArgument(0)); ZeebeDeploymentValue expectedDeploymentValue = ZeebeDeploymentValue.builder() .beanInfo(classInfo) .classPathResources(Arrays.asList("/1.bpmn", "/2.bpmn")) .build(); Optional<ZeebeDeploymentValue> valueForClass = readZeebeDeploymentValue.apply(classInfo); assertTrue(valueForClass.isPresent()); assertEquals(expectedDeploymentValue, valueForClass.get()); }
@Test public void shouldReadNoClassPathResourcesTest() { ClassInfo classInfo = ClassInfo.builder() .bean(new WithoutAnnotation()) .build(); when(expressionResolver.resolve(anyString())).thenAnswer(inv -> inv.getArgument(0)); Optional<ZeebeDeploymentValue> valueForClass = readZeebeDeploymentValue.apply(classInfo); assertFalse(valueForClass.isPresent()); }