Tomcat70ContainerAdapter extends AbstractTomcatContainer { @Override public Long[] getResourceAttributes(String name, Context context) { Long[] result = new Long[2]; try { ResourceAttributes resource = (ResourceAttributes) context.getResources().getAttributes(name); result[0] = resource.getContentLength(); result[1] = resource.getLastModified(); } catch (NamingException ex) { logger.trace("", ex); } return result; }  @Override boolean canBoundTo(String binding); @Override void addContextResourceLink(Context context, List<ApplicationResource> resourceList,
      boolean contextBound); @Override void addContextResource(Context context, List<ApplicationResource> resourceList,
      boolean contextBound); @Override List<FilterMapping> getApplicationFilterMaps(Context context); @Override List<FilterInfo> getApplicationFilters(Context context); @Override List<ApplicationParam> getApplicationInitParams(Context context); @Override boolean resourceExists(String name, Context context); @Override InputStream getResourceStream(String name, Context context); @Override Long[] getResourceAttributes(String name, Context context);  }
@Test public void resourceAttributes() throws NamingException { Assertions.assertNotNull(new Expectations() { { resource.getAttributes(this.anyString); this.result = new ResourceAttributes(); } }); final Tomcat70ContainerAdapter adapter = new Tomcat70ContainerAdapter(); adapter.getResourceAttributes("name", context); }